How we got prepared for a programming contest

I was interested in algorithmic programming contests during my undergraduate years. The idea in these contests is to solve an algorithmic problem in your favorite programming language. A judge, another piece of code, checks correctness of your solution with a number of test cases. Your code should pass all tests. In most cases, judges check execution performance too: your code should execute within the allowed time/memory limits.

There are a number of prestigious programming contests that are known world wide. We, as a team, wanted to compete in ACM International Collegiate Programming Contest (ICPC). If you aim high, the preparation is a long (~2 years) and tedious (full of practice) process. This wasn't the case for us as we were one of the first groups which wanted to compete in such competitions in the country. We signed up for a regional ICPC contest taking place in Bucharest, Romania.

As a start, I practiced by coding solutions for questions from a number of websites. These websites offer free judges and problem sets. They generally have tutorials on competitive programming and let you test your solutions. Check out some of these websites and go over the problems they have:

The more you practice on these judges, the better you will perform during programming contests.

On-site training was the second step. We organized events at METU (in Ankara, Turkey) and invited Vasyl Biletskyy, a member of a former ACM ICPC winner team. We spent a week studying useful algorithms, held contests in which we competed with each other, discussed solutions for the problem sets and received various answers to our questions. Although one can prepare well enough by solving harder and harder problems, it was helpful to learn from an experienced coder.

The final step was to organize practice contests to be ready for the contest environment. We used a mix of questions from the judges I listed above and discussed our algorithms with each other.

Although we, as a team, didn't have a good result in the contest, it has changed how we view coding and allowed us to experience what it takes to win such a competition. I hope this post can be a good starting point for those who consider competing. Good Luck!


February 2014