American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro To Competitive Programming – Darin

September 23 @ 7:00 pm - 8:00 pm

Gamas Sub

Today We Did
  1. We discussed Cowntact Tracing 2 USACO problem from https://usaco.org/index.php?page=viewproblem2&cpid=1348
  2. We discussed 3 things
    1. Finding the number of smallest infected cow group.
    2. Finding the longest number of days have passed.
Homework
  1. implement in Java to find the longest number of days have passed.
    1. You first need to find the smallest infected cow group number. Edge case, for the edge cow group, double the number. For example, if you have “111011110”, the smallest infected cow group number is 4 instead of 3. This is because 3 on the edge is doubled to become 6. This doubling of the number on the edge is only for the purpose of finding longest number of days have passed.
    2. After finding the smallest infected cow group number, use the formula already discussed in the class in google spreadsheet. to get the longest number of days passed.
  2. Find the greedy algorithm formula for finding the smallest number of initial infection cows. Consider the following data points/variables
    1. Longest number of day passed
    2. Number of sick cow per group.
  3. After you find the formula you can use for loop to go through each group of the sick cow and apply formula and sum up the result.

Details

Date:
September 23
Time:
7:00 pm - 8:00 pm