USA Computing Olympiad (USACO)

For many students interested in high level programming, the USA Computing Olympiad (USACO) is a big deal. This national competition is in the form of an online exam and participants have 4 hours to complete 3-4 tasks, all of which are cow themed. That’s right, it’s coding about cows! Participants use algorithms and data structures written in C, C++, Pascal, Java, or Python to create solutions to these problems, and scores for each problem depend on how many input cases the program can solve within the time limit.

First time participants begin at the bronze level. As their scores improve, they can move up through the silver, gold, and platinum divisions. Platinum is of course the top tier of competitors and there are typically only about 50 competitors nationally that place in the platinum tier each year. At KTByte, our courses prepare students to compete at the highest level.

You may be wondering what benefits are involved in participating. Here are our Top 5 reasons why you should definitely take advantage of this great opportunity:

  1. USACO is prestigious, and competitors who do well will get a massive leg up on their college applications because this exam covers high level material that students typically study in the first two years of undergraduate computer science degrees. Participating also gives you the chance to represent the United States in the International Olympiad of Informatics (IOI).
  2. It’s difficult. This means that it is great training for writing algorithms and practicing high-level problem solving.
  3. It’s accessible and free – all you need is the internet and a computer (oh yeah, and awesome programming skills). You don’t even have to be a student or a US resident to participate (unless you want to compete to be in the top 16 who join the finalist camp or top 4 who represent the US in the IOI).
  4. It has 4 levels of difficulty and 4 competitions per year, meaning you have multiple chances to try!
  5. It provides lots of training content and past problems available on the USACO website, meaning it’s an excellent learning resource.

*BONUS reason: Who doesn’t want to write code about cows??

Let’s take a look at a sample problem (taken from the USACO December 2011 contest).

“The cows are at it again!  Farmer John has carefully arranged N (1 <= N <=10,000) piles of hay bales, each of the same height.  When he isn’t looking, however, the cows move some of the hay bales between piles, so their heights are no longer necessarily the same.  Given the new heights of all the piles, please help Farmer John determine the minimum number of hay bales he needs to move in order to restore all the piles to their original, equal heights.”

Summary:

  1. You get inputs like [2,10,7,1]. How many moves does it take to get all the hay bales to be the same value?
  2. Solving: You discover your target is [5,5,5,5] by taking average.
  3. Solving: to get from [2,10,7,1] to [5,5,5,5] you need to move 7 hay bales total (3 from pile 2 to pile 1, 2 from pile 2 to pile 4, and 2 from pile 3 to pile 4)
  4. Algorithm: generally, you find the mean and find the sum of all values greater than the mean, minus the mean: so 10,7 are bigger than mean and (10-5) + (7-5) = the solution
  5. You write the code for the algorithm
  6. The system will grade your code against a list of numbers up to 10,000 in size (not just 4 numbers like I did in the sample)

Looking for a more difficult problem to solve? Check it out here!

So what are you waiting for? Sign up for a course today!

Leave a Reply

Your email address will not be published. Required fields are marked *