Competed at ICPC North America Championship

ICPC stands for International Collegiate Programming Contest. It is the largest competitive programming (CP) competition among the universities of the world.

My team won the North Central regional competition (Iowa State news). I was lucky enough to participate in this big championship with two talented programmers Omar and Ian.

The championship was held on 20-22 February, 2020. Here’s the official result.

To prepare for this championship, we had many study sessions with experienced grad students Vahid and Hooman, as well as Prof. Mitra. We decided that each one of us should focus on specific subjects, so I took on string algorithms.

A time limit exceeded (TLE) result means the program did not finish within the judge’s time limit. Language settings depend on the contest and judging system, not on a universal ICPC rule. For example, DOMjudge supports language-specific time factors. Check the event’s rules rather than assuming every language gets the same allowance. C++ can be useful when performance is tight, but algorithm choice, implementation details, and familiarity with the language still matter.

I learned quite a lot from these study sessions. I got a better grasp of C++ at least in CP context. Learning how to write my own implementations of complex string algorithms such as the KMP algorithm in C++, I mostly struggled but gradually got a grasp of what was going on. I didn’t have enough practice time to get prepared and I wish I had started CP earlier in my life. This was my last chance in my life to participate in ICPC.

Some of the tips that are also important in job interviews are:

  • The initial thinking is the most important. Don’t just write code. Make sure that you are clearly thinking about the algorithms you are going to write. Pay attention to details such as what are the possible combinations of values, the possible signs of the numbers, what is the max N, and so on.
  • Estimate time and memory use from the largest input. Big-O notation describes how work grows, not an exact runtime. At n = 10,000, an O(n^2) algorithm can already involve about 100 million iterations, depending on the loops. Whether that fits depends on what each iteration does, the language, hardware, time limit, and number of test cases. There is no universal operations-per-second budget or safe cutoff for n. Even a linear algorithm can be too slow if the input is large enough.

We flew from Iowa to Atlanta, Georgia to attend the championship at Georgia Tech. The hotel we stayed at was gorgeous. I wondered how much money they were spending on bringing all these people and organizing this event. We also had a party in the center of the city and ate really good food.

Now talking about the contest itself, the majority of the problems were really difficult. We managed to solve 3 out of 12 problems.

MIT beasts solving problems at lightning speed made us nervous. There were legendary competitive programmers such as Benq. There were so many smart people there.

One Java submission kept getting TLE, while a C++ translation passed. That was a useful reminder that the same broad algorithm can have different runtime costs across implementations. It was not a controlled benchmark or proof that C++ is always faster than Java. Input handling, memory allocation, libraries, compiler optimizations, and runtime behavior can all affect the result.

Overall, I enjoyed this competition a lot. I learned in this competition how fast some people can think and solve problems. They also had a lot earlier head start than I did. They have been doing CP since they were teenagers.

I used to play Shogi (Japanese chess) a lot when I was younger. It’s similar in a way that many of the strongest players I saw were elementary school kids. They have been learning this game since their brain was so flexible as a kid. I think CP is a lot easier if you have been doing it since you were young because you get to learn all the patterns needed to solve the problems. Just like chess, you need logical thinking, inspirations, and pattern recognition that comes from many years of practice.