When you think of computer programmers, you might imagine a solitary coder sitting in a cubicle bathed in flickering light. But you should imagine a team – in the case of MIT, a cheerful, triumphant team of competitive student programmers, determined to solve incredibly tricky problems faster and more accurately than their competitors. The team recently placed #1 at the International Collegiate Programming Contest (ICPC) North American Championships, which means they are now eligible to attend the 46th annual ICPC World Finals. next year.
Here, three of the team members – Ziqian Zhong and MingYang Deng, juniors in computer science and engineering, and Anton Trygub, senior in mathematics, computer science and engineering – describe what it is like to compete at the highest levels of the computer science.
Q: Many of our readers may have never seen a programming contest before. Tell us a bit about the ground rules: what kinds of problems you encounter, how much time you have to prepare or solve them, and the tools you are allowed to use.
Zhong: We typically face 10-15 issues and five hours. You can code with Java, Kotlin, Python and C/C++. Most teams, including us, prefer to use C++ because it’s very concise and generally runs faster.
Deng: In ACM-ICPC competitions, a team consists of three members while only one computer is available, so on average, a member only has one-third the access to the computer. Also, problems in a programming contest usually require the implementation of efficient algorithms and data structures. So we usually spend a lot of our time thinking about solutions before we code.
Q: Do you usually know your competitors or do you have friends on opposing teams? Is there trash-talk in programming contests? In other words, what is the social atmosphere like?
Zhong: I knew some of my competitors personally before, and the general social atmosphere is quite chill and friendly. We played poker and all sorts of other card games together; I ended up learning two new card games! I guess trash-talking isn’t that popular here.
Deng: I agree. I have made friends with many of my competitors, all of whom are very nice. People here share the same interests and similar backgrounds. It looks like a community. It is therefore not necessary to be competitive outside the contest.
Trygub: Competitive programming is different from other competitive activities in that you are not competing against someone directly, like in football, chess, etc. You just need to do your best yourself, so there’s no tension between the teams. And at the higher level, the competitors know each other, since we regularly participate in the same competitions. We’re here to make friends and help the CPIC community grow!
Q: What makes a problem particularly difficult to solve, and what problem was the most difficult at the North American Championshipsfrom your point of view?
Zhong: To solve a question, we think and code. Some problems are difficult to code, with many complicated details and hard-to-solve cases. For some other problems, it is difficult to find the right solution. Personally, I hate the earlier problem types (it’s not a typing contest!) and the later problem types are more popular. H-problem was probably the hardest and we were the only team to solve it.
Trygub: The problem can be difficult for different reasons: it can be simply a heavy implementation with little or no thought, or requiring knowledge without which you could just give up or have a lot of complicated details. I prefer problems where the difficulty lies in the thinking part, in something creative. It’s great to read the problem statement and think, “How can this even be solved?” »
Q: Tell me about a solution that you thought was particularly creative or that you were really proud of.
Trygub: I don’t think any of my solutions were particularly creative, but H-problem was quite interesting to solve. The setup is, again, “How can this even be solved?”, and then you start looking at some cases and notice some observations, which suddenly add up to the complete solution.
Zhong: I don’t remember the details about Problem D but I remember it’s a fairly simple problem and requires some counting tricks!
Q: How will you prepare for the World Finals next year? What does this imply ?
Zhong: I guess we’ll do more sparring contests together. There is no secret ingredient. Above all, practice more.
Deng: We will practice more, during which we will refine our strategies.
Trygub: We will have to listen more to our coach on this one! But yes, above all practical.
Q: In recent years, teams from China, Russia and Poland have been particularly dominant in the World Finals. Why do you think different countries have different styles of preparation or competition?
Zhong: I think a lot of teams in Russia and Poland have trained a lot and have good strategies. I heard that the Red Panda team at Moscow State University likes to start with the hard problems and leave the easy problems to the last hour. It’s not optimal, in terms of penalty (the longer you take to solve all the problems in total, the bigger the penalty), but it probably makes better use of the last hour (the last hour is usually very stressful and it is difficult to do well). It’s quite different from what we usually pursue.
Trygub: I don’t really think we should be talking about any sort of trend here, the participants from these countries have proven to be very strong and have made it to the World Finals several times. Hopefully we can bring some North American dominance to the final!
Q: Tell me a bit about what contests like this have taught you as a programmer.
Zhong: I think it helps me code faster and more accurately. In a contest, you don’t have much time to debug once things go wrong.
Trygub: It helps me find the most efficient way to implement something, while keeping it clean, otherwise I’ll die of debugging.
Deng: It also improves my collaboration skills. In contests like this, you have to communicate with your teammates, express your thoughts clearly, work as a team and believe in each other.