IOI 2002 from the inside: an Ilyushin to Seoul, a hundred dollars and “Congratulations on what?”
2002
The journey. From Riga to Moscow we flew on an ordinary plane, and there we changed to a big Ilyushin: two aisles, three blocks of seats, and they fed you on board. I had never seen anything like it. It was genuinely scary: the wings shook, and the plane kept dropping into air pockets. When they opened the door in Seoul, hot, humid air hit me, as if it were salty. I had never felt such a contrast; the only thing like it came later, in Italy.
Yongin. They took us to Yongin, and everything there was covered in Korean and olympiad flags. I think we all lived in one room. The night before the first contest day someone ran down the corridor banging on the doors. I was nervous as it was, and now I couldn’t fall asleep for a couple of hours, so I came to the olympiad short of sleep.

“Me in Korea”, with my IOI 2002 contestant badge.
The contest days. Three problems in five hours, and they were much harder than I had expected. For the first time there was an open-input problem: you are given the input files, and you can get the answers with a program or by hand, which makes it easy to burn a huge amount of time. You could order printouts of your programs to think on paper rather than staring at the monitor. One such printout I later gave to my coach.
Between the contest days there was a rest day. Sergey Ilyich Melnik told us not to go anywhere, just to rest and catch up on sleep. I think he was right: Sergey Kozlovich, who was always first in our group and had won gold at the physics olympiad, either hadn’t slept or was coming down with something, and solved almost nothing.
A hundred dollars. Melnik gave Kozlovich and me a hundred dollars each “just in case”: we both came from poor families, and neither of us had a father. I felt terribly awkward, but I took it, to keep in reserve. Half of it I did spend: in a shopping centre I bought a CD player and tiny clip-on “shell” headphones that hooked over the ear. Back home I walked around Zolitūde with it. Whenever I started running, the player shook and skipped. I burned my own discs: I already had a CD writer and rewritable CD-RWs.
Korea. They took us to a museum where you could look through an MRI scan of a human body in any projection. The buildings amazed me: tall, twenty storeys or so, and very thin; I couldn’t see how a typhoon didn’t knock them down. The weather kept changing: sunshine, then rain, then drizzle. Our team’s guide was a Kazakh who lived in Korea. We asked him to write “Andrey” and “Kindex” in Korean. I took a photo of a computer screen with the Korean Start button; it is almost the only thing I have left from that trip. On IRC my friend Zonik wrote to me: “Get some sleep.”

“Andrey” and “Kindex” in Korean.

That very screenshot: Korean Windows with the “시작” (Start) button, and in the browser creator.times.lv, my site where I was gathering a team to make a game.
The frogs. Nobody knew the results before the ceremony. We came to the awards and discussed how everyone had solved what. About the frog problem Sasha Belov told me: “You solved it wrong. You try every pair of points and don’t prune, so you’re at n³, and it can be done in n².” I was terribly upset.
The ceremony. The medals were announced from the lowest bronze places upwards. I thought of only one thing: “Just let them call my name.” For the last six to eight years every Latvian had won at least a bronze and aimed for silver, and there were only about twenty gold medals for the whole world. Bronze was announced: none of ours. Silver: none either. And then our team leader Māris Vītiņš and his deputy Mārtiņš Opmanis came up and shook our hands: “Congratulations!” “On what? We didn’t get anything.” Gold medallists were called on stage in fives, and I was named in the first or second five. I hadn’t expected it at all and thought I didn’t deserve it: I had got the frogs wrong, after all. Sasha Belov won gold too.
Fifteen years later I found those problems and ran my frog solution. It passed only because the tests were weak and didn’t catch my approach. With twenty or so proper tests I would have got 80–90 points for it rather than 100. And the bus-terminals problem I never did solve: a stub pulled me through.
I came home short of sleep and jet-lagged. It was the last week of summer, friends kept inviting me to celebrate, and I remember little of it. One day I’d like to meet the guys from that team and ask what they remember.
How I got to this olympiad in the first place: “Nobody took me to olympiads, then I won IOI gold”.