Skip to main content
How does one prepare for the IOI? (Aiming for gold) : r/informatics_olympiad
Go to informatics_olympiad
r/informatics_olympiad
• 6y ago
Lucky_Wrap

# How does one prepare for the IOI? (Aiming for gold)

https://www.reddit.com/r/informatics_olympiad (IOI subreddit)

I'm not sure I can tell you how to win gold at the IOI, because the best I got was silver.

There's no formula I know other than practice that will allow you to become one of the top algorithm programmers in the world. I've heard that the IMO has a "magic number" of 4000: 4000 challenging problems you have to solve before you can expect to win a gold medal. The magic number for the IOI was estimated during that conversation to be 700. Presumably, it is less because IOI problems are much easier than IMO problems, although perhaps you could argue something along the lines of IOI problems being "bigger" on average.

Practice is nicely complemented by reading algorithms texts. I had read Introduction to Algorithms and Sedgewick's Algorithms in C++ (parts 1-4 and 5) cover-to-cover by the time I went to IOI 2010. Another obvious good choice is The Art of Computer Programming. I've heard good things about Programming Challenges by Revilla and Skiena, which is probably the best approximation to an actual textbook for algorithm contests!

Now, we've established that you need to practice. That being said, often the problem is figuring out how to practice. There are really two problems here.

First, you need to make sure you are motivated enough to practice as much as you will have to. I'm a bit cynical about this: I maintain that most of my motivation was derived from having no social life and no romantic/sexual prospects, and that I started losing motivation in my final year of high school since my social life was starting to pick up and the results wouldn't help me with college admissions anyway. But I was motivated, at least for a while. When I was stuck on USACO training page problems, I often skipped eating lunch in an attempt to finish them as soon as possible. I got a huge rush from solving problems. During the summer of 2008, I probably solved close to a hundred SPOJ problems. If anything, programming contests are what taught me the power of motivation. I learned how to program when I was about 9 or 10 years old, but I sucked at it back then. It was the hardest thing I had ever tried to do, and I gave up quickly because I assumed I was just no good at it. My friend Jacob Plachta on the other hand, who went to the same school at me, enjoyed it and quickly became very good at it. It's not until I was maybe 14 that I started enjoying solving problems even though I wasn't very good at them, and then I quickly became quite good at them. So within a year I went from trailing quite far behind Jacob to beating him on most contests we both took. That's why today I never assume I am smart enough to do well at anything without practice. When I really want to learn something like electrodynamics or differential forms, I do every problem in the textbook---something my 10 year old self would've been far too proud to consider doing.

Programming contests were truly the only thing in life I really enjoyed, for some time. I hope this isn't you, of course. I hope you can be motivated to succeed in programming contests without missing out on other parts of life. Social life or no social life, you should be as motivated as I was---more, I suppose, since I didn't win a gold. If you can't be that motivated, then you should ask yourself why you care about winning gold at all. It is unlikely that the prospect of recognition alone, for example, would provide enough motivation for success. It's a bit like how Bill Gates and Mark Zuckerberg weren't trying to become obscenely rich, and if that had been their primary motivator, it's almost guaranteed that they would've failed.

The second problem is to figure out how to practice most effectively. Here are some general tips.

- If you're serious about doing well on the IOI, don't solve TopCoder problems. They are nothing like IOI problems and most likely nothing like what you will see on the way up (i.e. at your country's team selection contests). I'm not saying they have no value, of course: it's better to do TC problems than not to do anything at all. But it is far better to do other kinds of problems than TC problems. TC problems have small input and are very tricky to get right, and if you make a small mistake then you get 0 points. They are also intended to be solved (or not solved) in a very short period of time. They are also often typically more intensely mathematical than OI-style problems.(By the way, shortly before IOI 2010, I saw a discussion on TopCoder about how it seemed that anyone who was red prior to attending an IOI won gold at that IOI. I'm sad to say that I proved an exception to the rule.)

- The best problems to practice with are relatively recent IOI problems and problems from national and trans-national OIs, such as USACO (gold division), COCI/COI, CEOI, and APIO. These problems are fairly challenging, but they are the closest to what you can expect to see on an IOI. They typically have elegant solutions, which may nevertheless be quite a pain to code. They may involve some advanced techniques you will need to know that you will likely not see anywhere else, such as the heavy-light decomposition, the convex hull trick, and the "coastline" data structure.

- If you are not at the level of those challenging OIs yet, I highly recommend that you start out as I did, with the USACO training pages and SPOJ (which lets you sort by number of successful solvers and therefore has an endless supply of problems whose difficulty levels are approximately known). I also particularly recommend my own site (of course), which has nearly all the old problems from the Canadian Computing Competition---both the first (open) stage, which is easy, and the second (invitational), which is still a bit easier than the OIs of better-performing countries such as the U.S. and most of post-communist Europe*.* (It is also where you should go if you want to have your solutions to old IOIs graded.)

- ACM-style problems are useful, and there are quite a lot of them out there that you can have automatically graded (for example, Saratov State University :: Online Contester). They share a lot in common with IOI problems. I would say that IOI : ACM :: IMO : Putnam. Remember that at the IOI you get 3 problems on each day to be solved in 5 hours, whereas at ACM you get 5 hours to solve 8 problems (I think). This does mean the problems will be somewhat different in style. Still, you should solve as many ACM problems as you can, provided that you're not neglecting OI problems.

Good luck!

https://www.quora.com/How-does-one-prepare-for-the-IOI-Aiming-for-gold

Join the conversation
Sort by:
Best
Open comment sort options
[deleted]
• 6y ago
• Edited 6y ago

Not a very relevant comment, but I heard that heavy-light decomp was removed from the IOI syllabus

Created Dec 26, 2019
6 years ago
Restricted

Anyone can view, but only approved users can contribute

31 0

##
Moderators

Message Mods

- u/AutoModerator

View all moderators
Reddit Rules Privacy Policy User Agreement Accessibility Reddit, Inc. © 2026. All rights reserved.