« All Events
2:30 PM – Intro To Competitive Programming – Gamas
January 20 @ 8:00 am - 5:00 pm
Today We Did
- We explained the high level logic of Cowntact Tracing 2 December 2023 USACO problem http://usaco.org/index.php?page=viewproblem2&cpid=1348
- We come up with 2 formulas
- Formula to find the Maximum number of days passed.
- If the cluster is in the edge and it is not zero, then the formula is rounded down NC – 1.
- Example of this would be 111011100. The left edge is 1.
- Another example 00111110111. The ridge edge is 1.
- If the cluster is in the middle then the formula is rounded down (NC -1)/2 .
- Example of this would be 0111011110. Both the left and right edge. is 0.
- Formula to find the least number of initial infected cows for a single cluster of infected cows. rounded up (NC / ((2 x Max Num Of Days Passed) – 1))
- After try to code using the following rules
- Find the smallest number of Maximum number of days passed among all the clusters of sick cows. You should used formula #1.
- After you do #1. Go through each cluster and apply formula #2 to find the smallest number of infected cow for each cluster and sum them up.
Homework
- Do the code for http://usaco.org/index.php?page=viewproblem2&cpid=1348.
- Also try to do http://usaco.org/index.php?page=viewproblem2&cpid=1349