ICPC Regional Contests: The Complete Story
Allendale, United States
Where the dream began.
Journeys
From contestant to coach to judge, somehow my journey with the ICPC World Finals has lasted more than a decade.
2012 – September 4, 2025 · Allendale · Yekaterinburg · Marrakesh · +6 · 9 entries
Allendale, United States
Where the dream began.
Yekaterinburg, Russia
My first World Finals ended with two solved problems and a thoroughly humbling result.
Marrakesh, Morocco
At my second World Finals, we solved every easy problem and left with a few regrets.
Rapid City, United States
My first World Finals as a coach.
Beijing, China
My second World Finals as a coach.
Atlanta, United States
Attending the inaugural ICPC North America Championship.
Luxor, Egypt
My first World Finals on site as a judge.
Astana, Kazakhstan
Back for the annual World Finals—for the third time this year.
Baku, Azerbaijan
Several days of sightseeing around the World Finals in Baku.
Where the dream began.
2012
The story has to begin with the 2012 regional contest. The fact that I entered at all was something of an accident.
I had started competitive programming in high school, also by chance. A teacher came to promote it to our class with stories of exceptional students who competed internationally, earned full scholarships worth tens of thousands of dollars, and were admitted to Princeton. Our provincial contest cost about 30 yuan to enter. He reduced the proposition to one memorable line: pay thirty yuan, earn three hundred thousand.
So I signed up, became absorbed in it, won a silver medal at the national competition, and secured admission to Shanghai Jiao Tong University.
I knew what caliber of student attended SJTU; many were far stronger than I was. Its ICPC team was stronger still, with several world championships behind it. I therefore entered university with no intention of continuing. I clearly had no chance.
That changed when I arrived in the United States in 2012. I was in a 2+2 program: two years at SJTU, two at the University of Michigan, and degrees from both. I came to Michigan as a junior. Michigan had just placed second and won gold at the 2011 World Finals, the best result in school history, and the department displayed the achievement prominently in its main building.
I noticed it and moved on. My roommate saw an opportunity. SJTU was formidable, he reasoned, but perhaps Michigan was not. He investigated and discovered that the 2011 team—qualified through the 2010 regional—had depended on two extraordinary contestants: one later retired and became our student coach, while the other was a one-semester exchange student and former member of China’s IOI team. Neither remained eligible afterward. Without them, the program collapsed and did not even reach the 2012 World Finals.
My roommate read the 2011 regional problems, studied the standings, and reached a simple conclusion: he could do this too.
The contest required teams of three, so he approached me with the one line that worked: “Don’t you want another chance at that dream?”
He produced the 2011 problem set. This one was trivial, he said. So was the next. We examined six problems, all apparently easy. “See?” he said. “That’s qualification right there.”
I joined him.
Our team selection that year took several turns, then broke altogether.
Before the internal qualifier, we asked the coach how teams would be formed. Could the two of us lock ourselves into one team? No, he said. For fairness, the top three would form Team One, the next three Team Two, and so forth. Did that mean we had to manipulate our scores?
In practice there seemed little reason. We had placed first and second in every practice contest before the qualifier.
Then the qualifier went badly. My roommate had grown overconfident and spent too long on a difficult problem, leaving several easy ones untouched. Worse, the qualifier ran on two days over a weekend, and contestants could choose either day. We both competed on day one. Even after his mistakes he remained second, so all seemed well. On day two, however, two unexpected contenders appeared. Neither had attended any practice, so we had not known they existed. Both passed him easily.
The plan fell apart. I would apparently team with those two, both Chinese international students. I did not particularly mind, but for my roommate it was the familiar story of asking a friend to accompany you to an audition, only to watch the friend get the part.
I finished first with 7 problems, the next two solved 6 each, and my roommate solved 4. The gap was too large to challenge unless one of the others withdrew voluntarily.
Neither did. I joined them instead. I will call them my problem-reading teammate and my passenger teammate. The first would become the teammate who concentrated on analyzing problems during our two World Finals appearances, although at this point he still did plenty of implementation.
The passenger teammate supposedly had a considerable reputation in high school and was once spoken of alongside Cao Qinxiang, winner of China’s 2008 National Olympiad in Informatics. That sounded formidable.
He then let us down on a truly impressive scale.
Before the regional, we heard that our region would receive a wildcard. We believed it normally sent three teams and would therefore send four. Its three leading programs—Carnegie Mellon, Waterloo, and Toronto—were exceptionally strong. The first two regularly approached the World Finals medal positions; Toronto, we heard, had a former national IOI team member that year.
Those three were elite not merely within the region but throughout North America. Waterloo and CMU frequently finished as the top North American school at the World Finals. The balance changed only later, when MIT attracted a number of strong Chinese contestants.
Judging from World Finals results in those years, North America was a comparatively weak region: stronger than Africa, the Arab region, and South America, but well behind Europe and Asia on average. Within that weaker region, ours was among the strongest.
We thought the wildcard solved everything. Remove the three established powers and we were the obvious next choice; the other schools that year did not appear competitive.
We were relaxed, concerned only with preserving fourth place. We did some university-organized practice but nothing extra. I barely knew my new teammates.
Contest day brought nine problems, of which the first eight were straightforward. They still required some code. By World Finals standards the implementation was negligible, but our coding was ordinary then, and we spent considerable time on those easy problems. CMU solved the first six in ninety minutes and reached eight around the three-hour mark, finishing everything before the scoreboard freeze.
My problem-reading teammate and I needed more than four hours to implement and debug six. Meanwhile, the passenger teammate began with the final—and hardest—problem. Problems are not normally arranged by difficulty; by coincidence the last one was hardest, and by coincidence he read in reverse order.
It was geometry. With any experience, we would have recognized it as the sort of deliberately formidable regional problem meant to keep the strongest teams occupied. Our teammate was extremely confident, declared it manageable, and began coding. He produced a program of just over 60 lines near the start and failed to debug it for the rest of the contest. No surprise: the official solution required more than 200 lines of case analysis. Sixty lines were unlikely to cover it.
It consumed much of our early computer time. Midway through, he abandoned geometry and moved to Problem 7, another easy one involving currency conversion and shortest paths. The catch was that floating-point arithmetic introduced too much error; fractions had to be maintained with 64-bit integers. He used floating point and failed again.
An hour later, the problem-reading teammate recognized the issue and rewrote it with fractions. It still failed. We solved neither problem. Afterward we discovered that one array had simply never been initialized. Set it to zero and the solution passed.
Problem 8, the only one I never even read, was basic network flow. I could have solved it. The contest never gave me the chance: all our computer time went into debugging the other two.
We finished with 6. CMU completed the set; Waterloo and Toronto reached 8 around three hours but did not finish everything.
In the postmortem, the passenger teammate suddenly realized he had effectively contributed nothing: two attempted problems, neither accepted, zero additions to the score, and a great deal of computer time consumed.
My roommate competed on Team Two and had an even worse day. One teammate was an American whose name, rendered phonetically in Chinese, sounded rather unintelligent. We had thought little of it beforehand. After the contest my roommate was furious, and the unfortunate implication of the name became the man’s permanent nickname in our stories.
My roommate knew his team was essentially along for the ride, so he did not take the contest very seriously and spent much of it coaxing this teammate through code. The experience was startling: algorithms went unexplained and implementations went unwritten, painful to watch at every turn.
We placed eighth overall, behind four CMU teams, two Waterloo teams, and one Toronto team. Looking at that list, qualifying might itself have been awkward.
After a month of waiting, we learned that we had not qualified. Our region did not normally have three places after all; it had two, and the third was already the wildcard it regularly received for being strong. There would be no fourth.
Misfortune can conceal good fortune. In retrospect, not qualifying spared us a World Finals appearance in which we would merely have made up the numbers. The passenger teammate was no longer eligible after that season. The problem-reading teammate, my roommate—now the mathematics teammate—and I decided to train properly, compete seriously, and stop treating the World Finals as merely a vacation.
This was alarming. We had only wanted a trip. How had we suddenly acquired ambition?
I could not have imagined how much further my relationship with the World Finals would extend.
In early 2013, the latter half of that season, the three of us trained frequently with others from Michigan. CMU’s student coach and ours were friends and both served on the USACO committee, so we often trained at CMU, occasionally alongside members of the U.S. IOI team, who demolished us. We had entered no official contest as a trio, though we had done many informal ones. The difficulty with informal practice was that our roles remained casual: whoever felt like coding did so. We had not yet settled into the roles that would later define our problem-reading and mathematics teammates.
Searching through emails more than a decade later, I found this ancient photograph sent by our assistant coach.
2013
By 2013, it was time to contemplate score management again. After more than half a year of serious, if hardly relentless, training, our fundamentals were vastly stronger.
Would unexpected rivals appear? We did not know. None did, and given what we knew of the school, none should have. All three of us had earned first prizes in Chinese provincial informatics competitions. Against students who began programming at university, there was little reason for us to lose.
We passed the internal qualifier safely in the top three. One newcomer with astonishing typing speed stood out: he implemented 3 of 7 problems faster than either teammate. But speed was his limit. He finished with 4 while each of us solved at least 5.
At the regional, our goal was qualification; our coach’s was beating Waterloo. Michigan had once taken World Finals silver ahead of Waterloo but had never beaten it at the regional, and Waterloo was consistently strong. The coach had made this a longstanding objective.
We still allocated implementation almost at random. The problem-reading teammate coded at least two solutions and, after finding his own disastrous bug, passed a simulation problem. The mathematics teammate stared at the final problem, I, an easy one, wondering whether intermediate values could exceed 18 digits and require big integers. When another Michigan team passed it, we knew big integers were unnecessary: we knew their level, and they certainly could not implement them. He took over and passed almost immediately.
We discarded Problem G, a geometry problem, on sight. Was this meant for human beings? That was the correct decision. The judges’ implementation was nearly 300 lines. The contest later appeared on Codeforces for the world’s strongest contestants to attempt; ten years later, nobody had solved it within five hours.
The main drama was Problem E, a network-flow problem whose modeling was already difficult. When the problem-reading teammate and I found the formulation, it was deeply satisfying. We coded it, submitted, and timed out. We replaced the initial linear search with binary search, submitted again, and still timed out.
The margin seemed substantial. Each submission took five minutes to return, suggesting a genuinely long run.
We ran out of ideas. With linear search, we knew in theory that the graph need not be rebuilt each time; one could continue augmenting the existing graph. We did not know how to implement that, though it was probably the intended solution.
With 12 minutes left, we tried speculative and constant-factor optimizations and submitted frantically. Judging was so slow that every submission remained queued.
About five minutes before the end, one passed—the submission from seven minutes earlier. By then, countless later attempts were stuck in the judging system. When the acceptance appeared, all three of us shouted loudly enough for the room to hear. Someone applauded, then others joined, and soon contestants across the hall were applauding us.
It was a remarkably friendly response. They did not even know what had happened; accepted submissions after the scoreboard freeze were not displayed.
We qualified in second with 7 problems, tied with first on solved count. We also beat Waterloo—and pushed them into fourth, out of the World Finals entirely. Later we learned that even without the final acceptance, we would still have qualified and remained second in the school standings, which rank only each school’s best team. We had been safer than we realized.
Training that year remained much like the previous year: team sessions when schedules allowed and individual work otherwise. The problem-reading teammate and I took a graduate algorithms course, one of the hardest courses most students encountered. I later spent five years as its teaching assistant during my PhD and came to understand that very well.
At the time, however, we treated it as an easy elective. We sat at the back discussing World Finals problems, barely listened, and both earned A+ grades.
We also entered NAIPC, the North American Invitational Programming Contest. Its predecessor was the University of Chicago invitational the previous year; now renamed, it invited North America’s World Finals qualifiers to compete. It was not an official qualifier. After North America’s contest structure was reorganized, it gradually evolved into NAC and entered the formal qualification system.
That year’s NAIPC was lavish. The venue was a grand library reading room that looked remarkably like Hogwarts. Competing together in person was excellent, and the prize pool aspired to World Finals scale: $12,000 for the champion, $6,000 for second, and $3,000 for teams in the silver award tier.
We placed fourth, received a silver award, and collected $3,000—the first and only prize money of my competitive career. Our timing was fortunate. The prize pool collapsed over the next few years, eventually becoming a $250 Amazon gift card for a gold award. Apparently the first year had consumed the next decade’s budget.
There were 21 teams. Our region’s three World Finals qualifiers placed third, fourth, and sixth. Within North America, our region really was exceptionally strong.
I remember little of the contest itself beyond passing our last problem around three hours and then knowing nothing else for the remaining two.
Before the World Finals, I returned to SJTU to graduate while both teammates stayed in America. That was the end of organized preparation; we did no serious training.
2014
A new season began. Having learned from the previous World Finals, we had to train properly. We had been far too casual.
How had this become more serious every year?
Human appetite is endless. Once something is attained, one wants more. We began merely hoping to travel to the World Finals; now we wanted a medal.
Team selection brought a new complication. I had graduated and begun a PhD. Many strong classmates from SJTU also came to Michigan for graduate study. More worrying, the mathematics teammate discovered that a graduate student from National Taiwan University had won World Finals gold and was Codeforces red-rated—among the platform’s elite. We called him the red-rated star.
If he competed, one of us would certainly lose a place.
Fortunately, we met him at the information session and learned that he was no longer eligible. We relaxed.
None of the other strong arrivals from SJTU entered either. The three of us again swept the top positions and stayed together.
The regional was anything but calm, though the result was never seriously in doubt. After its Waterloo the previous year—apparently ending a very long streak of World Finals appearances—the University of Waterloo returned seeking revenge and won with 8. Two schools followed with 7; the next had only 5. The top three schools were far ahead.
The contest itself was unnerving. Perhaps the problem setters had imitated the previous World Finals’ extreme difficulty. For the opening 20 minutes, the room was silent and nobody solved anything—abnormal even at the World Finals. Waterloo’s winning team recorded its first acceptance at 42 minutes; the runner-up and our team did not score until after an hour. The set began at medium difficulty, with no easy entry problem. Teams below 22nd solved only one, and those below 42nd solved none. For ordinary contestants, it must have been miserable.
No problem particularly stayed with me at the time. Only later did I revisit Problem I and appreciate how good it was: computational geometry preprocessing followed by network flow, genuinely World Finals caliber. We discarded it immediately. Waterloo solved it after the freeze, fully deserving the title.
We finished third and grew slightly nervous. Strictly speaking our region still had only two guaranteed places; third depended on a wildcard. Given these results, surely the wildcard would come to us.
It did, and we qualified without further drama.
We again entered NAIPC and placed sixth for a silver award. The prize was already incomparable to the previous year: a $150 Amazon gift card per person. Had the contest gone bankrupt after one edition?
We trained a great deal that year, hoping for a strong World Finals result.
2016
I did not participate the previous year because our student coach was still in place. In 2016, during the fifth year of his PhD, this exceptional competitor simply left the program to start a company.
I was astonished. From the Chinese perspective I knew, leaving in year five was almost incomprehensible. Graduation was close; why abandon that investment rather than endure a little longer?
Americans, however, often made such decisions more freely. He wanted to found a company, so he did.
Michigan was left with a vacuum. The faculty coaches generally did not manage student training; the student coach did. When he departed, I stepped in, feeling as though I had been summoned in an emergency.
I worried over every aspect of the program, beginning with recruitment. All three of us had retired the previous year, and Michigan’s regional results had predictably collapsed. Team Two did best in 12th, followed by Teams Three and Four, while Team One fell below 30th. So much for a qualifier that supposedly assigned teams strictly by rank.
Knowing the talent pool was empty, I recruited personally. That summer I assisted an introductory algorithms course and invited every high-finishing student to compete. They did not look strong enough to qualify, but they were better than nobody.
At the start of term I prepared practice contests, contacted the leading students one by one, and found a younger student from SJTU with contest experience. After considerable persuasion, he agreed to enter.
Eventually I found three contestants who had each earned first prizes at Chinese provincial competitions. That ought to have been enough for qualification.
Reality disagreed. Their weak implementation prevented them from qualifying—and they did not even survive our internal team selection intact.
They had consistently occupied the top three in practice, so I relaxed. Then the official qualifier produced another surprise.
Two American contestants who really were brothers—the older and younger brothers—finished first and third. Unlike our 2012 surprise arrivals, they had attended practice and performed reasonably, but never this well. Apparently they had chosen the right moment to peak.
My three recruits landed second, fourth, and fifth. Team formation became awkward. They naturally wanted to stay together, particularly because one spoke very poor English and pairing him with Americans would have made everyone uncomfortable.
I entered a prolonged argument with the faculty coach, who insisted that the top three form Team One. I urged him to consider the contestants’ preferences. After several rounds, he agreed if the two brothers consented.
They did. My impression was that they had no strong preference; merely placing this high was unexpected, and qualification for the World Finals probably had not entered their minds.
Ranks 1, 3, and 6 formed Team One; ranks 2, 4, and 5 formed Team Two.
The sixth-place contestant now entered the story. I called him the Hong Kong Correspondent. He was Chinese, studied in Hong Kong, and was at Michigan for a single exchange semester. He was not a journalist; the nickname reflected his extraordinary command of contest gossip. Ask him anything and he knew it, living up to the old joke about reporters who somehow reach every corner of the world before their Western counterparts.
After selection, he asked about training and essential algorithms. He had begun programming at university and competitive programming only that semester, so his foundation was thin. I did know one shortcut. After years in this regional, I knew its style: nearly every contest included network flow, and the flow problems had grown easier. I had even placed two in the internal qualifier specifically to identify contestants who could solve them.
I told him to ignore everything else and concentrate entirely on network flow.
That advice proved invaluable. Neither brother knew flow. The Correspondent solved the regional’s flow problem, giving the team enough solved problems to surge into second place in the final 10 minutes and qualify. Otherwise they likely would have finished outside the top ten.
At the time, however, I devoted more attention to Team Two. They were easier to summon informally and always came when asked; Team One generally appeared only for official practice.
The three recruits’ implementation ability stunned me. Once, nobody attended my office hour, so I brought them in to practice a basic single-source shortest-path problem. I came apart watching three provincial first-prize winners fail to code it in ninety minutes. Had I really been this weak in my first season?
They continued failing to debug easy practice problems. At the regional, weak coding again cost them straightforward problems, and Team One completely outclassed them.
The older American was an exceptional implementer, both fast and disciplined. According to the Correspondent, he followed OOP rigorously, defining classes rather than relying on loose functions and global variables. That was rare in contests because it increased code volume and usually reduced speed. Its benefit was equally clear: when something failed, his structured code was much easier to debug.
Team One qualified, and I was delighted: another World Finals trip. Then we learned it would be held in the United States, and I was disappointed.
The Correspondent returned to Hong Kong after the semester, and the team barely practiced together. I later heard they did some online training, but we all know how effective that tends to be. At SJTU, we too had claimed to practice online.
Everyone else remained. Their algorithmic foundations were so weak—or nonexistent—that I began an informal class.
It was entirely volunteer work. I mainly wanted the two brothers to learn the standard algorithms before appearing at the World Finals.
Then another contestant came into focus: a different American whom I will call American Two. He had finished seventh in the qualifier, led Team Three, and was clearly dissatisfied with that outcome.
The brothers attended perhaps 60 percent of the class. American Two came every time. I taught extremely quickly because time was short and the syllabus broad; within three or four weeks attendance had nearly vanished. Once, he was the only person there, and I delivered the entire session to an audience of one.
Over the semester I felt I had passed everything I knew to him. How much he absorbed remained unclear.
2017
Another season arrived.
I again recruited everywhere, though I now had some confidence in the American contestants, particularly after American Two had learned many algorithms and the older American had reportedly become even faster.
At the information session I met two Peking University graduates beginning graduate study at Michigan. Unlike the previous year’s three recruits, both had competed on Peking University’s ICPC teams—perhaps not Team One, but Teams Two, Three, or Four. They possessed genuine ICPC experience and should at least have reliable implementation. I was excited. I probably could not have made SJTU’s fourth team; surely someone from Peking’s second could handle a regional without my help.
So I gave them none.
Both underperformed in team selection. I thought the contest itself was excellent: every problem was solved by at least two people, nobody solved all 12, and the winner finished with 9—the most balanced outcome I could imagine.
My one regret was a mathematics problem whose derivation seemed wonderfully elegant. In practice, contestants either knew the result and solved it immediately or had no avenue to derive it during the contest. That was poor design.
With enough problems and separation, the qualifier remained dramatic to the end. I invited my former mathematics teammate to watch online. The final 30 minutes brought repeated reversals: American Two used his solid algorithms to reach first with 9 at 15 minutes remaining; then, with four minutes left, the older American found the mathematical result and jumped to second with 8. Until then we had blamed that problem for potentially excluding him from Team One. He rescued himself on merit.
The top three became the older American, American Two, and an unfamiliar American I will call American Three. The two Peking graduates finished fourth and fifth, hurt chiefly by penalty time and perhaps by my mathematics problem. The Americans seemed to know the result; neither Peking contestant did. Without it, both might have reached Team One.
I liked the resulting structure. With the older American and American Two anchoring Team One, regional-level strength was secure; who the newcomer was scarcely mattered. The two Peking contestants made Team Two so strong that, as a joke, its third member almost seemed optional. The top five were far ahead: fifth solved 8, sixth only 5.
At the regional, Team One justified that confidence. The older American was extraordinary. Others read the problems, but he wrote every solution, coding 6 accepted problems in 1 hour 14 minutes and taking the lead. Progress slowed afterward, but they added two more and qualified as the region’s second-ranked school.
Team Two matched their solved count with more penalty. Without Team One, their third-place school position would probably also have qualified.
Nothing more was needed that year. Both Peking contestants planned to return, so the next season looked secure.
Then I learned the World Finals would be in China. So much for free international travel; I would treat it as a university-funded trip home.
2018
Another season began.
Both Peking contestants returned. We seriously discussed whether they were still eligible. People generally believed students more than five years into university could not compete. Reading the rules closely, however, we understood the two conditions to be alternatives: either the enrollment-year requirement or the birth-date requirement might establish eligibility. That was our understanding at the time.
While serving as a teaching assistant for algorithms, I recruited one more contestant: a fellow SJTU alumnus who was now a PhD student, with contest experience but none in ICPC. That seemed fine. The Peking pair could implement; he could concentrate on analysis. After considerable persuasion, I had another all-Chinese trio. The World Finals location was already known to be Portugal, so the four of us created a chat called the “Portugal Tour Group.” Results there hardly mattered; qualification was enough to secure the trip.
Team selection ruined the plan. The first Peking contestant, the SJTU contestant, and the second Peking contestant solved 8, 5, and 4, placing first, third, and fifth. Pulling fifth into Team One would be difficult. Second place belonged to American Three, with 6. In short, first was far ahead and everyone else occupied supporting roles.
The fifth-place contestant had only himself to blame. A little over an hour in, he attacked the hardest problem and remained stuck until the end, at one point questioning the data. When I explained the solution afterward, he realized his approach was wrong. Who plays a contest like that?
The second Peking contestant withdrew from consideration. The first Peking contestant, the SJTU contestant, and American Three formed Team One. Our Portugal Tour Group officially disbanded.
With reasonable execution, this team could still have reached the Finals. Instead, at the regional, they again failed to implement easy problems. They did finish as the region’s third-ranked school, but first solved 9, second 8, and they solved 5; no wildcard was awarded.
It was frustrating because their only opponent seemed to be themselves. They were going to finish third regardless; a marginally better performance might have secured the wildcard.
The Portugal Tour Group was formally dissolved.
My coaching career ended there. Across six visits to the same regional site, I qualified twice as a contestant and coached two more qualifying teams. It had, on balance, been a distinguished run.
I did not yet know that an entirely new chapter of the World Finals was about to begin for me.
My first World Finals ended with two solved problems and a thoroughly humbling result.
This was my first ICPC World Finals, and I was tremendously excited. At the time, it was still called the ACM-ICPC World Finals.
I will skip the path through regional competition here. For us, that road seemed to lead through Grand Rapids, Michigan, every year. For the full story, see the regional-contest collection.
I do have to say something about the Russian visa, because it was among the most difficult I have encountered. The application required the original invitation issued by the event. First, the organizers had to be authorized to issue such a document at all; then the physical original had to survive international shipping. It looked appropriately formidable: special brownish-yellow paper covered in text I could not read, with a serial number, my name, signatures, and stamps. That document then had to cross an ocean from Russia to the United States. If it had disappeared in transit, I suspect the practical answer would have been to give up. We eventually hired a travel agency to handle the visa and book the tickets. As far as I remember, the visa alone cost each of us more than $300. Fortunately, the university reimbursed it.
Before the contest, I was in China while both teammates were in the United States, so we had almost no team practice. We attempted two online sessions, coding while connected by video call. They were essentially useless. Before I returned to China, our academic schedules had allowed only a handful of practices together; otherwise, everyone trained alone. We were walking into the World Finals with almost no team preparation.
The trip itself began with a request for leave. I never imagined that I would need formal permission to miss time at a university, much less that obtaining it could become this complicated.
I was enrolled in the 2+2 program at the University of Michigan–Shanghai Jiao Tong University Joint Institute. I spent the first two years at SJTU and the next two at Michigan, then returned to Shanghai for a final-semester capstone project. Completing it meant receiving degrees from both universities. Students could choose not to return, in which case they would receive only the Michigan degree. In practice, many people who planned to work in the United States stayed there instead. From that perspective, returning to Shanghai for the second degree seemed less useful than spending the semester on another U.S. internship, which was far more likely to help with recruiting. The result was an unusually low completion rate for the dual-degree path. As far as I remember—and my memory may be off—it was under 80 percent, probably near the bottom at SJTU.
I was now back at SJTU for that final capstone semester. I already had enough credits, so the project was my only course. I had returned largely because I still did not know where I wanted to build my career and thought it prudent to secure both degrees first, even though I would most likely work in the United States. That made me remarkably relaxed about the consequences. If I somehow failed to graduate from SJTU, I could live with it; I would simply have spent a summer in China with friends.
That was the background. Then contest week approached. University students skip class all the time; this is hardly unique to China, and professors at Michigan rarely took attendance either. What surprised me was that, in an environment where quietly missing class was routine, formally asking permission to miss it seemed almost unforgivable.
I had not planned to request leave at all. There were only two class meetings that week, and I could simply have skipped them. Unfortunately, the second capstone presentation fell in the same week and counted for 5 percent of the final grade. I was not concerned about losing those points; passing the course should not have been a problem. But when I spoke to the faculty member leading the capstone supervisors, he told me I could not miss it: failing to attend any presentation meant failing the entire capstone.
I was stunned. How could missing something worth 5 percent automatically mean failing the course? I searched the syllabus, grading documents, and every other piece of course information I could find. None mentioned such a rule. I might have understood it for the final defense, but this was only the second presentation, with two more still to come. I could not understand the decision. With the limited perspective I had then, I could only interpret it as my request having bruised his pride.
There was little I could say beyond explaining that this was an important competition—the World Finals—and asking whether formal university leave would make the absence acceptable. He said he might consider it if the leave were official. So I had no choice but to begin the process.
That meant going to my student advisor. I no longer remember how many signatures were ultimately required—perhaps three—but his approval came first. I explained that I needed leave for the competition. His manner was gentler than the faculty supervisor’s, but the underlying questions were similar: Why did I need to go? Was the capstone not important? Did I truly have to attend? My answer was firm: yes, I had to go. As I said above, I privately placed little value on the SJTU degree if I ended up working in the United States and was prepared to do without it. I did not say that aloud, of course, but it made my outward position very clear. I was going.
Perhaps my advisor was persuaded by that resolve, and perhaps by my earlier record at SJTU: I had ranked second in the institute by GPA and received an academic achievement award, so I had a well-established reputation as a good student. He finally approved the leave and told me to compete well and bring honor to the university.
The awkward part was that I was representing the University of Michigan. SJTU’s programming team was already exceptionally strong; it certainly did not need me, and I doubt I could have made that team anyway. Naturally, I said none of this. I still wonder what my advisor would have thought if he had known I was not competing for SJTU at all.
Eventually I obtained the leave and the necessary senior signatures. I returned to the faculty supervisor, who agreed to deduct the 5 percent without failing me outright.
It had taken an absurd amount of effort. As an introvert, I felt as though this one request had consumed my entire social quota for the year.
At last, with nothing left hanging over me, I could go compete.
I flew alone from Shanghai. My teammates and coach traveled from the United States. As noted earlier, many students chose to remain in America for internships rather than return to SJTU for graduation, and one teammate had done exactly that. His standard U.S. technology-company summer internship lasted twelve weeks—exactly twelve weeks—and he needed to miss an entire one of them. That could not have been easy either. His account also included some version of “I absolutely have to take this week.” Somehow he cleared every obstacle and secured the time off, despite the risk that it might hurt his chances of a return offer.
My flight connected in Moscow, as flights to many parts of Russia seemed to do. The transfer was smooth until immigration. The officer asked where I was going. I said, “Yekaterinburg.” He replied, “Екатеринбург?” I repeated, “Yekaterinburg.” He repeated, “Екатеринбург?” And around we went.
That is almost a transcript of what happened. I was speaking English, and he mostly was too, except that he pronounced the city in Russian. The Russian and English pronunciations differ substantially, especially in where the stress falls, and I had no idea what he was saying.
Eventually he seemed to understand me and let me through.
I reached Yekaterinburg, arrived at the hotel, and met my teammates. Then all three of us realized the same thing: nobody had brought a plug adapter.
It was not our first time abroad—we had all obviously been to the United States—but that had been different because we lived there long enough that buying adapters was unavoidable. This was probably the first trip for all three of us to a country where an adapter was genuinely necessary, and not one of us had thought to pack one.
We appointed a representative to ask the front desk whether we could borrow one. That representative was me. My English was not very good then. After I tried socket, power, and charger, the receptionist smiled and said, “I think what you want is an adapter.” To be honest, I did not know the word, but it sounded convincingly like the object I needed.
I obtained one adapter. For the rest of the week, all three team members gathered in one room every day and took turns charging our devices.
I barely remember what we did during those days. I think our coach took us to a few sights around the city, but I cannot recall what any of them were. Nobody on the team spoke Russian. Our assistant coach, as I remember it, may originally have been Russian but had moved to the United States for reasons he did not really spell out. According to him, if he entered Russia again, he might have great difficulty leaving. He phrased it carefully, and that was only how I understood it. Had he been with us, perhaps we would have seen more of the city.
Then contest day finally arrived. The problem set was catastrophically difficult. A rumor circulated that the Judges—the people who selected and prepared the problems—had deliberately made it brutal because they feared tourist might finish early by solving the entire set before the five hours were over. Gennady Korotkevich, known by the handle tourist, was widely regarded as the strongest competitive programmer in the world at the time. His team had come very close to finishing the previous year’s set. According to the official post-contest analysis, three extreme test cases had been added to the hardest problem shortly before the contest; without them, his team would have solved the entire 2013 problem set.
Whatever the origin of the rumor, and whatever caused the difficulty, the 2014 set was a disaster. Years later, after I became a World Finals Judge myself and learned how problems were selected, I found that year even harder to explain. I asked a number of people who had been involved, and their answers were variations of, “Was there something unusual about that year? I don’t remember.” The rumor was probably nonsense. To the Judges, it appears to have been an ordinary World Finals whose difficulty simply went badly off course.
Back to the contest.
The first solve on Problem K came at 17 minutes. By the 15-minute mark, we already knew something was wrong. In a normal year, the first solve would almost certainly have appeared around ten minutes; this time the entire scoreboard was still silent. Things did not improve after K was solved. Usually, once the first problem falls, every team turns to it and dozens have accepted it within an hour. Here, almost nobody followed. We read K, had no idea how to solve it, and fell quiet ourselves. We could tell it was a data-structure problem but could not see how to use one. We submitted a few improvised optimizations, accumulated eight wrong attempts, and never solved it. The solution required a range minimum query structure. At the time, we were nowhere near good enough: all three of us had heard of RMQ, but none had mastered even that basic technique well enough to recognize it.
The deadlock lasted until minute 28, when someone solved D. We reread it and decided it might be manageable. Earlier we had not been sure; it was not an obvious easy problem. But if another team had solved it, then it had to be possible. One teammate took it on, and roughly an hour later we accepted D, our first solve of the contest.
Problem C received its first solve at minute 35. It was computational geometry: clearly solvable at first glance, but full of cases and difficult to get accepted. All three of us were weak at geometry, and whenever one appeared, I was usually the person sent in to improvise. As expected, C had case after case. We made six submissions and never solved it. During the contest, we thought we were close. Afterward, we downloaded our code and the official data and discovered that we were nowhere near the correct solution. The computation used real numbers but required integer output, demanding careful treatment of precision. When a result lay arbitrarily close to an integer, different cases required rounding up, rounding down, or taking the nearest value. Three computational-geometry novices were not equipped for that distinction. We had no realistic chance of getting C accepted.
At minute 68, someone solved I. We read it and could not solve it either—but this time our reaction was different. We looked at the team with the first solve and thought, Wait, that team solved I? Then surely there had to be some way to hack it. We still could not devise a clever heuristic, so we used the bluntest possible approach: brute-force search with deliberate time management. The program searched until it was close to the time limit, stopped, and printed the best answer it had found, whatever that happened to be. It worked. As a precaution, we randomized the input order first in case the data had been designed to punish a fixed ordering. Our first four submissions failed because the stopping threshold was wrong and the program exited too early. After tuning the parameters, our fifth submission was accepted. The team with the first solve on I did indeed finish the contest with only that one problem. That has to be one of the strangest one-problem performances in World Finals history.
The other solved problems had little to do with us. We would read one, realize we had no idea how to solve it, and quietly move on.
We recognized B as a knapsack dynamic program requiring the multiple-knapsack optimization, but nobody remembered how that optimization worked. In fact, the problem required taking the underlying idea and deriving an additional optimized formula. We were plainly not capable of doing that on site.
E was the most painful missed opportunity. We read it and found no direction at all. In reality, its entire logic matched DFA minimization, which one teammate and I had studied together only a year and a half earlier. Somehow neither of us remembered it. The problem should have been a gift, but in the contest we never saw the connection.
We also attempted A. Nobody solved it during the contest, including the unofficial teams. We tried largely because we could not do much else. It was a constructive, ad hoc problem rather than an algorithmic one, so one teammate spent three hours thinking about it from the middle of the contest onward. He submitted twice without success. Afterward, our coach asked whether those submissions had been serious. They had. A was in fact solvable, but the empty column on the scoreboard had frightened every team away. Someone later asked the Judges, who had apparently regarded it as the easiest problem in the set—something they expected to be the first solve and then widely accepted. That mismatch was remarkable. For the four cases of n mod 4, the true optimum was n in every case. My teammate had successfully derived n for three of them; for the last, he could only reach n+1. We had come painfully close to what might have been the first—and perhaps only—official solve of A.
We finished the contest with two problems solved.
The frustration afterward was palpable. A World Finals set this difficult felt almost unheard of, which helped the rumor about stopping tourist from finishing early spread quickly. An unofficial tourist team solved seven problems with a lower penalty time and would have placed first, but unofficial teams did not count in the standings. They nearly reached eight or more. One member spent an hour on A and still did not solve it, further evidence that it was not remotely trivial. J was ingenious: its broad direction was visible, but the derivation was punishing and the implementation enormous. Petr later described a moment in which the coding was finished, only for the team to realize they had forgotten the requirement for the lexicographically smallest answer—and abandon the attempt.
The Resolver then produced a dramatic reversal. At the scoreboard freeze, Moscow State University led with six solved problems while second place had only four. Given the difficulty, the championship looked all but certain. Instead, St. Petersburg State University solved three problems in the final hour, also finishing with seven and winning by 39 penalty minutes. Their last accepted submission came after eight wrong attempts, with only two minutes left in the contest. It could hardly have been closer.
Those stories aside, all three of us were deeply disappointed. We agreed on one thing: we would return the following year.
At my second World Finals, we solved every easy problem and left with a few regrets.
After our dismal performance the previous year, we decided to prepare properly this time.
The division of labor among the three of us was now quite clear. I handled implementation-heavy problems and the more exotic algorithms, so over the year I learned a great many techniques I had never even heard of before—half-plane intersection and the Aho–Corasick automaton, for example. Their names sounded suitably elaborate, but they were also genuinely useful. My own training method was to work through problems from previous regional contests, which covered most of the standard algorithms reasonably well.
My mathematics teammate handled mathematics, dynamic programming, greedy algorithms, and anything else with even a hint of math. He trained by competing on Codeforces and Topcoder. Their problems differed substantially from the ICPC style: almost every problem involved mathematics to some degree, and the shorter contest format limited how much code a solution could require. That made them well suited to learning this side of competitive programming.
My problem-reading teammate, who did not code at all, was responsible for knowing all the strange things. Our expectation was simple: he did not need to implement them, but he needed broad exposure to everything. His training method was to open an online judge and read the problems in order. If he could not solve one, he read the editorial. Whenever he encountered an unusual technique, he remembered it and told us if it seemed like something the rest of the team ought to know.
Beyond individual practice, we trained together vastly more than the year before. To prepare for the contest, all three of us took the minimum course load in our final semester—and easy courses at that—so we could devote more time to training. My mathematics teammate and I were first-year graduate students; our problem-reading teammate was a senior. We began at roughly one team contest per week, increased to two near the end of the semester, and practiced every day once vacation began. A contest alone lasted five hours. Add the time needed afterward to finish every problem we believed we should have solved, and the entire day was gone, sometimes with work still left.
As the training accumulated, so did our confidence. We ran five-hour virtual contests on Codeforces and noticed that many teams heading to that year’s World Finals were practicing the same sets, though virtual participation meant we did not start at the same time. We encountered teams from Tsinghua, Peking University, Shanghai Jiao Tong, and several European universities. The more contests everyone played, the more often even excellent teams had an off day. In other words, we eventually managed to beat nearly every strong team we could find at least once. Our conclusion was irresistible: if our luck and form were good enough, was there any team we simply could not beat? After some thought, only tourist’s team came to mind. Our goal for the year was a medal.
The contest eventually demonstrated that “if our luck and form were good enough” was a rather demanding condition. On the day, our performance was merely normal, perhaps slightly below normal.
There was a more serious problem. Most of the virtual contests we practiced on Codeforces came from Russian training camps. Russia had exceptionally strong teams—ITMO University in St. Petersburg, tourist’s school, had already dominated the championship for years—but those camp problems differed markedly from the World Finals. Their style was closer to Codeforces itself: heavy on mathematics and light on implementation. Put simply, those contests may have trained my teammate very well while doing almost nothing for my own ability to implement pure coding problems. Unfortunately, I did not recognize this until our post-contest review.
That year the three contestants, our coach, and the assistant coach who had been unable to travel to Russia the year before all flew to Morocco together. I remember almost nothing about the organized sightseeing in the days before the contest. My mind was probably occupied entirely by the competition.
What I do remember is the heat. Going outside felt unbearable; all I wanted was to stay in an air-conditioned room. A friendly man on the street noticed how hot I was and began talking to me about the weather. I understood none of what followed until he pointed into the distance and declared, “the great Sahara!” That part I understood. I assume he was proudly reminding me that the Sahara was nearby.
One incident remains especially vivid. Our assistant coach, who was of Russian background, could be remarkably fearless. In a market in central Marrakesh, we came across a tattoo artist working from a street stall. Do not ask why a tattoo artist had a street stall. It looked unreliable at first glance and not much more convincing at second. Our assistant coach suddenly decided that perhaps he should have a tiger tattooed on his arm. The artist asked him to draw the design, so he sketched what looked like a cartoon cat on his arm.
All three of us had exactly the same thought: if you go through with this, do you still want that arm? In the end, for reasons I do not remember, he did not get the tattoo. Perhaps he eventually decided that the operation looked as dubious as we thought it did.
The market also had vendors selling freshly squeezed orange juice. The press looked extraordinarily wasteful. An orange was cut in half, one hemisphere was placed peel-side down in the machine, and a lever crushed it. The juice came out; the half orange was finished. Even by sight, the yield looked terrible. Still, the juice was excellent. Perhaps the waste was the reason: none of the peel, or even the membrane around the flesh, made it into the drink. There was no bitterness at all, only sweetness.
I had never seen a machine like it. Several years later, on a trip back to China, I encountered the same technique at an airport in a fully automated vending machine. You paid, and it cut three oranges in half and pressed them on the spot. The machine was evidently not very precise. It jammed midway through, stole one of my oranges, and left me with a cup only two-thirds full. There was, naturally, nobody to whom I could appeal. A few years after that, I never saw those machines again. Perhaps the ingredients were too expensive, the machines too unreliable, and the complaints too numerous for the business to survive.
Back to the contest. The three of us discussed running one final practice round on site, then abandoned the idea. It sounded unnecessarily painful, and we could not see what last-minute cramming would accomplish.
On contest day, we entered the hall and found balloons in thirteen colors. That meant thirteen problems, an unprecedented number. By all logic, one of them ought to be exceptionally easy—a free point. That was exactly what happened.
Someone solved A five minutes after the start. It was indeed the giveaway. We followed and accepted it at minute 11.
Then we looked for the next problem. B was geometry and appeared hopeless, so we discarded it immediately. F and M were implementation problems that did not seem conceptually difficult but would take time. D looked at first glance like a mathematical problem involving calculus. Our problem-reading teammate identified C as a straightforward network-flow problem. I checked it, agreed, and began coding.
At minutes 28, 29, and 30, teams solved F, C, and D in succession. That reinforced our belief that C was simple network flow. I finished the implementation at minute 35, submitted it, and received a wrong answer. Awkward. I read the code twice, found nothing, and we were stuck.
We asked our problem-reading teammate to debug C while I began implementing F and our mathematics teammate derived the formula for D. At around the one-hour mark, the debugger found a missing case in C. We added it, revised the code, and accepted the problem at minute 63.
I probably spent more than half an hour coding F, then another twenty minutes debugging it against the sample. My implementation skills were simply not good enough. I submitted at minute 93 and got a wrong answer. We printed the code and continued debugging offline.
Our mathematics teammate began coding D. He had written very little geometry before, so I warned him to use a sufficiently long constant for pi—I had been burned by that before—and to use long double, not double, anywhere performance did not matter. During that time I found the problem in F, took the computer briefly to fix it, and accepted F at minute 102.
D was accepted on the first attempt at minute 112.
We now had four problems. When we looked up at the scoreboard, the contest had transformed. L, J, and I had received first solves at minutes 39, 47, and 53; E and H followed at 115 and 118. Nine problems had now been solved by someone, while the leader—I remember it as the University of Tokyo—already had seven. Seven problems in two hours was unprecedented. According to an analysis we had previously heard from a Carnegie Mellon coach, when nine problems were solved within two hours, a medal would require ten and gold would require twelve.
Our mathematics teammate started on L while I coded I. I was a simple interval-merging problem: given several groups of segments, compute the total length covered by every group. Our first idea was a segment tree, specifically a coordinate-compressed one because the endpoints were real numbers. That seemed implausibly elaborate given how many teams had already solved the problem. Were they all implementing compressed segment trees? Then again, this was the World Finals; perhaps they were. We eventually learned that we had badly overthought it. If we represented every uncovered portion as a segment, the task became finding the length covered by at least one such segment. Subtract that from the full range, and one sort was enough.
Instead, we wrestled with the compressed segment tree. It was not an especially complicated data structure, but we had never implemented one in this form. Our first wrong submission came at minute 126. There were countless boundary cases and comparisons between real values waiting to go wrong, so a very long debugging session began. I consumed more time on I than on any other problem. We submitted roughly once every half hour, accumulated four wrong attempts, and finally accepted it at minute 269. From beginning to acceptance, I had probably spent more than three hours on what was supposed to be a simple problem.
While I debugged I on paper, our mathematics teammate implemented L. It was not particularly complicated, and he accepted it on the first try at minute 173.
Then there was J, the strangest problem of the contest. It looked mathematical. After reading it, our mathematics teammate asked whether either of us knew an algorithm for multiplying two very large integers quickly. We did not. The answer was the fast Fourier transform, FFT. None of our practice contests had included an FFT problem, so none of us knew it. Our teammate had identified exactly what was needed, lacking only an FFT implementation. What could we do? Submit a lookup table.
The input contained only one integer, which made the problem ideal for hardcoding precomputed checkpoints into the source. We estimated the size and realized that the table might actually fit. The required file size depended on the sampling interval. If we stored one value for every hundred numbers, we would submit a program of roughly 100 KB, but a query falling between stored values would require computing as many as one hundred additional cases at runtime. Storing every fiftieth value would produce a 200 KB program but halve that work. We did not know the maximum permitted source-file size, so we decided to stop worrying and try it.
That began our long battle with the table. It should not have been so difficult, except that the contest laptop was painfully slow. My teammate tried to save a 100 KB source file and the computer froze, nearly crashing. The cursor spun for a full thirty seconds before the save completed. Every save was terrifying because we expected the machine to die. We had to operate carefully; copying and pasting too much data at once might freeze it again. Saving frequently is normally a good programming habit. Here it became a liability. Whenever my teammate instinctively pressed the shortcut before he was finished, he would immediately swear and ask why his hand had betrayed him again.
The next two hours consisted mostly of me debugging the compressed segment tree while he debugged the enormous table. We took turns at the computer, took turns submitting, and took turns being wrong.
Before the scoreboard freeze, the minimum number of problems in medal position had already risen to eight. We were stuck on two and had no idea how to free ourselves. Since our goal was a medal, we had to open another problem. While the mathematics teammate and I were occupied, our problem-reading teammate started E and judged it solvable with a simple greedy algorithm. I quickly implemented that greedy idea and got two wrong answers. He could not tell whether the algorithm or the code was at fault. We were now stuck on three problems. Then the mathematics teammate glanced at it, said the greedy approach was obviously wrong, and produced a counterexample in thirty seconds. E became completely inaccessible, returning us to being stuck on only two.
Our final submission of the hardcoded J solution came four minutes before the contest ended. It was accepted, with considerable difficulty, and that concluded our contest.
The one distinction worth mentioning is that we solved J with a lookup table, and we were the only team in the contest to do so. The official post-contest analysis specifically noted that hardcoding was possible, and that one team in the field had actually used that approach. That team was us.
At the time, I wondered whether the problem setters had never considered hardcoding at all—whether our submission made them realize it was possible, prompting them to add that paragraph to the analysis. Ten years later, after becoming a Judge myself and learning both the people involved and the standards of problem preparation, I consider it overwhelmingly likely that the Judges knew from the beginning that a table would work and deliberately allowed it.
We finished with seven problems. Ignoring penalty time, we were tied for 28th. With penalties included, we placed exactly 50th—the lowest-ranked of all teams that solved seven.
Afterward, we told our coach that we had solved every easy problem and therefore completed the basic assignment. But I and J had consumed so much time that we had none left for anything else. If we had not overthought I, and if we had known FFT for J, each problem could have saved us at least an hour. With that time, M, a pure implementation problem, might have been within reach. Our mathematics teammate would also have had a strong chance on H, a purely mathematical problem.
Reality offers no such revisions, so we were left with a few regrets. Congratulations went to tourist’s ITMO team, which solved the entire set before time expired, won with a perfect score, and became the first—and remains the only—team ever to finish a World Finals early by solving every problem. The hall erupted during the Resolver. Evidently everyone wanted to witness history.
Each contestant may appear at the ICPC World Finals at most twice. With that, my career as an ICPC contestant officially ended.
My first World Finals as a coach.
I was disappointed by the choice of location for that year’s World Finals. I was no longer a contestant, so attending was mostly an opportunity to travel, watch the contest, and enjoy the events. Naturally, I wanted the Finals somewhere worth visiting; Phuket, Thailand, the previous year had been a fine choice. This year, though… everyone who had heard of Rapid City before, please raise a hand. If you had never visited Mount Rushmore yourself, would you have known it was here?
The university paid for the trip, which immediately put me in a good mood. My only regret was that I was doing research on campus that summer and could otherwise have been a teaching assistant for a large course, earning what seemed like serious money to me at the time. After I spoke with the professor, however, he explained that the course had only one TA and could not accommodate someone disappearing for an entire week. So he turned me down. I had to TA a smaller course instead and earned only half as much. Still, there was nothing to deliberate over. Going to the World Finals was obviously more important.
Our team that year consisted of three students I called the “American Brothers” and the “Hong Kong Correspondent.” For their path through the regional contest—and the origins of those nicknames—see the regional-contest collection.
For once, I could join the day trip without a contest occupying my thoughts. The organizers took us to Mount Rushmore, the best-known attraction in the area. I went around with the Hong Kong Correspondent, whose reporter’s eye proved worthy of the nickname: he immediately spotted tourist, alone. After a moment’s hesitation, he rushed over and asked for a photo, successfully catching his chance. The Hong Kong Correspondent had always been a devoted tourist fan, so this was an enormous win. The moment the picture was taken, tourist appeared to activate a video-game escape skill and vanished at speed, plainly unwilling to be caught for another round of photographs. I did not get one. An enormous loss on my part.
All I can offer here instead is the bare rock of Mount Rushmore. Looking at the photograph of myself from that year, it is hard to believe that, despite being so young, I was already that young.
Afterward, we visited the Crazy Horse Memorial. What can I say? It was certainly a sculpture. The story as I heard it was roughly this: after the four presidents had been carved, a Native American chief objected. “We have our own great heroes,” he supposedly said. “We will carve a monument larger than your Mount Rushmore.” The planned sculpture was 172 meters high and 195 meters wide, more than twice the size of the Leshan Giant Buddha; the horse’s head alone would rise over five meters higher than the presidents’ heads. If completed, it would be the world’s largest man-made sculpture. More than sixty years had passed since work began in 1948. The chief and his seven sons had been moving their mountain one piece at a time, yet only Crazy Horse’s face had been carved. As the story went, the people behind the project did not want U.S. government money and hoped to build their national hero’s monument independently, relying entirely on private donations. The funding was therefore limited.
As for the current state of completion… the photograph speaks for itself. The small sculpture in the foreground, outside the shop, shows the intended result. The mountain in the distance shows the actual progress. Was it even ten percent complete?
When contest day arrived, I had no pressure at all, and the contestants did not seem to feel much either. They understood their own level. A ranked finish at the World Finals would be enough; anything but an unranked Honorable Mention.
They ended up with an Honorable Mention after all. The three of them solved three problems by minute 63 and then spent the remaining four hours working without another accepted solution. ITMO, entirely unsurprisingly, won the championship again.
I had no responsibilities at the venue and did not know anyone there, so I wandered around. Eventually I found a small group from Shanghai Jiao Tong University watching the contest and spent a long time sitting behind them, listening to their problem discussions. I had expected five hours to feel long, but they passed remarkably quickly. Sometimes I would stare at the scoreboard even though nothing had changed, with no idea what I expected to see. Then I would look up and two hours had disappeared.
After the contest, the organizers took everyone to a nighttime “light show” projected against the mountain. The quotation marks are deliberate, because my immediate reaction was: you call this a light show? I could gather a hundred people in the hills with laser pointers and produce something similar. It was painfully meager. It was not only my perspective as someone accustomed to China’s fondness for large, extravagant light displays. Even our American coach seemed unable to take much more. He wore an expression that said more than words could, then left early. From the look of him, one might have thought the show had personally embarrassed the United States.
My second World Finals as a coach.
I was even more disappointed by the choice of host city that year. I had been a coach for two years, and the World Finals had sent me once to the United States and once to China. Why? As a travel destination, I would personally take Beijing over Rapid City by an enormous margin, but I had already visited Beijing more times than I could count. I had never even studied there, yet I felt as though I had ridden at least ten complete circuits of Subway Line 2.
I wanted to see somewhere else in the world.
Still, the university was paying. I could treat it as a free trip home.
The team had three members that year, all American. For convenience, I will call them American One, American Two, and American Three. Their qualification campaign had been remarkably smooth: American One had delivered an exceptional performance and carried much of the regional contest. For the full story, see the regional-contest collection.
American Two had attended my algorithms class consistently since the previous year and worked extremely hard. I had taught him everything I knew. That was not an infinite supply of knowledge, but in terms of algorithmic breadth, it covered the kinds of problems one might encounter around the World Finals silver-medal level. How much of it he had absorbed was now up to him.
American Three’s distinct role in this particular lineup was, well, rather limited. American One was much faster at implementation, so there was little chance that he would take the keyboard. American Two had a broader range of algorithmic knowledge. Between those two strengths, most of what American Three might otherwise have contributed was already covered.
The hotel provided by the organizers was extremely luxurious. Our room was on the thirty-fifth floor—if I remember correctly, the highest floor accessible to guests—and the view was excellent.
The organizers arranged an excursion to the Great Wall. I did not go. Guess why.
A small group from our university then organized its own visit to the Forbidden City. I did not join that either.
In truth, I probably should have gone with them, but I had plans that day, so I let them venture out on their own. I decided to trust in the English-language competence Beijing had accumulated since the era of “Beijing Welcomes You.” Before they left, I asked the assistant coach, “Do you have any money?” He said no. “Do you have WeChat?” He did, but he had not yet worked out whether the payment function would actually work. “And you’re still willing to leave the hotel?” I asked.
I gave them all the cash I had, a little over 500 yuan. That seemed as though it should cover a day out. At the very least, it ought to pay for the tickets. Beyond that, they were on their own.
Apart from those larger excursions, I took them to the food streets near Peking University. That was when the limitations of my English as a non-native speaker became painfully clear. The assistant coach wanted milk tea. I looked at an entirely Chinese storefront and its endless list of optional ingredients and realized I had no idea how to translate any of it. All I could offer was: “They’re sweet. Just pick one.”
On contest day, I was still quite relaxed.
Compared with the previous year, however, I was slightly more nervous. In 2017 I had essentially been there for the experience. This time I had modest expectations for the team, especially given American One’s extraordinary implementation speed and American Two’s solid command of algorithms.
The result justified some of that optimism. They solved four problems and were officially listed in a tie for 56th place. More than forty teams finished on four problems, but our team was near the front of that very large group. If all the four-problem teams had been separated by the usual ICPC penalty ordering, they would have been around 60th overall. That was better than my own result in my first World Finals.
Unfortunately, Peking University did not win the championship. As the host team, they were clearly very strong and had given it everything they had.
One final episode occurred as I was preparing to leave Beijing. I was standing in a subway station with my suitcase, waiting for someone, when a salesperson from an English-language training company approached and asked whether I wanted to study English. I looked remarkably young then—young enough to be a student. In fact, I still was one.
“I don’t want to study English,” I said. “Are you hiring teachers?”
He replied that their standards for teachers were extremely strict, then launched into a long explanation to which I paid little attention.
At the end, for reasons I never understood—perhaps simple politeness, perhaps one final attempt to salvage the sale—he asked where I lived.
“San Francisco,” I said.
He went silent. After roughly three seconds, he said, “Are you messing with me?” Then he walked away.
You were the one who came over and started the conversation.
Attending the inaugural ICPC North America Championship.
Surprised to find me still here? Frankly, so was I.
I could already have graduated the previous year, and by now I was no longer even at the university. But the problem was much the same as in 2016: once I left, the student-coach position was suddenly vacant. The red-rated star stepped in, but a few issues involving our systems still drew me back. Michigan had its own judging system, built years earlier by my former student coach—an impressive achievement in itself. We had used it for years. It was basic, but remarkably complete.
I did not contribute much that year. I barely knew who the contestants were and did not attend the regional in person. What made the year different was the arrival of the North America Championship, or NAC. Previously, teams had qualified for the World Finals directly through the regional contests. Beginning that year, NAC added an intermediate stage. Each regional sent several of its leading teams; in ours, I believe it was roughly the top five.
This was the first NAC. As I remember it, regional contests still retained a direct qualification place at the time: the champion advanced automatically, while the remaining places were decided through NAC. A few years later, the regionals no longer had direct places and every team had to qualify through NAC. There was even a later occasion when a central region that had once sent four teams—allocations at the time depended on participation and other factors—saw every one of its teams eliminated at NAC, with none reaching the World Finals. In the years after the NAC system began, our region reliably sent three teams, sometimes more. It became rather easy to see which regions had not been quite as competitive as they thought.
The top five from our regional could reach NAC. That sounded almost too easy. There was hardly any pressure at all.
And indeed, the team qualified without difficulty. I followed Michigan to the inaugural NAC. I shared a room with one of the contestants, so my lodging cost nothing. I do not know whether there was an entry fee; whatever expenses existed, the university paid them. I did pay for my own flights, however. Officially, I was no longer at the university.
The overall schedule resembled the World Finals and lasted nearly a week. I had just started working, did not have that much leave, and had little involvement with the contest anyway. So I arrived midway through the event.
Under normal circumstances, someone would meet arrivals at the airport during the official arrival window. I apparently arrived too late. There was nobody at the airport and nobody at the metro station. I took the train to the contest venue by myself.
This was the hotel provided for the contest.
It was rather striking.
Contest day soon arrived. The competition hall was vast and open.
My impression was that NAC did not have many teams—perhaps a little over fifty—so it did not really need a venue this large. The organizers appeared to have arranged the room in a way that made the space look fully occupied.
During the contest, I spent most of my time discussing the problems with Michigan’s student coach, the red-rated star. It felt much like every other contest. Five hours looks long on paper, but at the venue it disappears remarkably quickly.
As for the result—well, never mind. I was not even entirely sure who was on the team. The only contestant with whom I had much connection was American Three, who was apparently still there.
We did not qualify, which was more or less what I expected. If reaching the World Finals had been that easy, what exactly had I spent all those earlier years doing as a coach?
Looking back much later, however, there was little to regret. The World Finals associated with that season was subsequently delayed substantially by the pandemic. Even if Michigan had qualified, I probably could not have attended because of my U.S. visa. The circumstances were very similar to the Bangladesh year; the full story is in the Egypt World Finals entry.
My first World Finals on site as a judge.
After many years away, I finally set foot at the World Finals again. I was thrilled, but also more than a little reflective—the eager heart was still there, though the hands were perhaps less steady. Time is unforgiving. Twelve years had passed since my first World Finals, and seventeen since I first encountered programming.
This was not, strictly speaking, my first time working as a World Finals judge. I had also been a judge for the contest in Bangladesh the previous year—or two years earlier, depending on whether one uses the event year or the calendar. I simply had not gone in person. Given how excited I was, I certainly would have gone if I could. The obstacle was not entering Bangladesh, but returning to the United States. For people like me who were living in the United States on a visa, international travel could make the US visa far more troublesome than the visa for the destination, especially for Chinese citizens. I faced the same problem that one of my fellow interns had encountered when I went to London in 2018: if I left the United States, I had no valid visa with which to return.
The pandemic made matters worse. China had not yet fully reopened, and returning meant an uncertain period of quarantine. US work-visa applications were also frequently being sent for administrative processing. Even if everything went smoothly, a trip home could easily keep me out for at least a month. Add the contest itself, and I would have needed roughly six weeks away—hardly a practical amount of leave for someone with a full-time job.
Another possibility was to apply for a US visa in a nearby country, such as Canada or Mexico. What I found online at the time suggested that appointments in Canada were already being scheduled a year out, perhaps because so many people had arrived at the same idea. Mexico appeared to be about six months out, though people said that an appointment within three months—or even sooner—might occasionally appear if one was lucky. There was no way to know until after entering the booking system.
I decided to try my luck. Unfortunately, this particular lottery had an admission fee. First I had to complete all the forms; more importantly, I had to pay before I could even see the appointment calendar. Payment itself was awkward and appeared to require someone local, which seemed like an excellent opportunity to lose money to a stranger. I found someone online who claimed to specialize in making these payments and asked him to handle it. The payment went through quickly. At least that part was not a scam.
The appointment calendar, however, was hopeless. I checked every US consular post in Mexico that offered visa services. Not all of them would handle cases like mine; some served Mexican nationals but did not offer the relevant interviews to third-country applicants. Every location I could use was booked more than six months ahead, far too late for the contest.
I refreshed the page quietly for two weeks and made no progress. It seemed that the only realistic option was to pay a professional appointment hunter to run a tool around the clock and hope it caught a cancellation. At that point I gave up. I treated the application fee as a donation to the US embassy.
There was another status-related complication. My US green-card priority date was close to becoming current under Chart B, while Chart A was still roughly a year away. For readers fortunate enough not to know this system: a green-card application begins with a PD, or priority date. In simplified terms, Chart A determines when an immigrant visa number is available and the case can receive final approval; Chart B determines when an applicant may be allowed to file early. Whether Chart B can actually be used in a given month depends on whether USCIS designates Chart A or Chart B for filing. Chart B generally runs ahead of Chart A, sometimes by a considerable margin. Because it governs filing rather than final approval, it does not predict when the green card will arrive. The dates can also retrogress: a chart may jump forward, attract a wave of applications, and then stall or move backward.
The obvious question is what good Chart B does if Chart A is not current and the card cannot yet be approved. In theory, that is true. In practice, green-card processing takes a long time. I hear it is much faster now, but in our day it was entirely ordinary to wait a year or more between filing and receiving the card. Earlier periods had been slower still, and an unlucky case caught in a sluggish process could take two years.
An unavailable immigrant visa number prevents final approval when Chart A is not current, but it does not necessarily prevent every earlier stage of processing. If USCIS permits Chart B that month and one’s date is current under it, the application can be filed and USCIS can begin its work. Once most of that work is complete, the case may wait for Chart A. If the priority date later becomes current and all other requirements have been satisfied, approval may follow relatively quickly. That can be vastly faster than waiting for Chart A before filing at all. In my customary shorthand: file two days late, wait two years longer.
In my own case, Chart B was on the verge of reaching my priority date. If USCIS allowed Chart B and I otherwise qualified, I could have filed. Leaving the United States during that window might have interfered with filing at the time, forcing me to wait until I returned—the details become even more complicated, so I will spare everyone. If Chart B then retrogressed before I came back, I would have regretted the trip for a very long time.
After weighing all of this, I decided not to attend the 2022 event—the 2021 World Finals—in person. It was my first year preparing and reviewing problems for the World Finals, and the experience was intimidating. A submission had to include a solution, but when a problem was assigned to me, no solution was provided. I had to work everything out and only then compare answers blindly with the original author. If assignments were random, this effectively required every judge to be capable of solving every problem, which was quite a standard. Fortunately, I had spent the previous two years improving and had reached red on Codeforces; otherwise, I doubt I could have done it. Secrecy was exceptionally strict. Every email and file had to be encrypted, as though interception were always imminent. Sending an email felt like participating in an espionage drama.
I later drew a diagram for one of my problems. It was spectacularly ugly, but nobody seemed inclined to replace it as long as the resolution was adequate. I also tried to hide an Easter egg in another problem’s test data by drawing the seven elemental symbols from Genshin Impact. The data was eventually removed for being unnecessary, after someone mistook the symbols for Pokémon types.
Then came 2023. The contest was originally scheduled for November in Sharm El Sheikh—yes, it was not supposed to be in Luxor at all. Then came the events everyone knew about. After the Israel–Hamas war began on October 7, 2023, security conditions across the Middle East deteriorated rapidly. Sharm El Sheikh was not close to Gaza, but travel, safety, and flight arrangements for many participants were affected, and the November plan was ultimately cancelled. The date became “to be determined.”
It was not until January 19, 2024, that ICPC sent participants a new message confirming April 14–19, 2024. The email first described the new venue only as “a famous city on the Nile”; Luxor was confirmed later.
The organizers had developed an unfortunate talent for choosing Egyptian venues just before trouble arrived. The 2011 World Finals had originally been planned for Sharm El Sheikh from February 28 to March 4. About a month before the contest, on January 25, large anti-government demonstrations began in Egypt as part of what became known as the Egyptian Revolution and the wider Arab Spring. Cairo and other cities quickly saw severe unrest. By around February 1, the organizers had decided that Egypt could no longer host the event; the World Finals would be postponed and moved, with the place and date to be announced. It was eventually held in the United States.
Now a similar plot had returned. None of this was within the organizers’ control, of course, but their reputation on the forums for being unusually “gifted” at venue selection was firmly established. Many participants were angry. This was a competition, not an ordinary conference, and postponement could seriously affect a team’s form—especially for teams capable of contending for the title.
The pandemic had already delayed the World Finals by more than a year. To catch up, the 2022 and 2023 editions were going to be held together, and now both were postponed. The 2022 World Finals would take place in 2024. Some contestants in this “International Collegiate Programming Contest” had graduated and worked for two years; no one knew how long it had been since they qualified. Bring them back after all that time and ask them to compete—what could possibly go wrong?
The contestants needed somewhere to direct their frustration, and the organizers received all of it.
After overcoming every imaginable obstacle, the World Finals finally took place in Luxor in 2024.
I was eligible for a visa on arrival in Egypt, so entry was no longer the problem. By then I had also received my US green card, making the return trip straightforward. Luxor was still not especially easy to reach. The flights and connections took long enough to remind me that I was no longer built for endless travel days.
After entering Egypt, I had to connect in Cairo for Luxor. I had not expected the trip to deliver two unpleasant surprises before I even left Cairo. During this particular transfer, I somehow went through three separate security checks. Do not ask why I had left the terminal’s transfer route. I could have remained airside, but the signs confused me so thoroughly that I followed them straight out of the airport.
The three checks were a light screening at the terminal entrance, a more substantial one before the departure area after presenting a boarding pass, and another substantial screening assigned to the individual gate.
That final checkpoint was where the trouble began. A single officer was operating it and seemed to have considerable discretion. Absolute power, as the saying goes, has its risks; I had not expected to receive such a direct demonstration.
The officer asked me to open my suitcase. He pointed to my steam eye mask and asked what it was. I explained that it was a warming eye mask for relieving fatigue. He said it was not permitted. At first I did not understand the significance. It was an unfamiliar item, I thought, and perhaps he was simply being cautious.
He placed the eye mask to one side, then pointed to the case for my electric toothbrush. What was that? An electric toothbrush, I said. Not permitted. By now I was thoroughly confused. The toothbrush joined the eye mask.
Finally, he pointed to my Apple earphones. What were those? Obviously, earphones. Not permitted. He set those aside as well. I had no idea what he was trying to accomplish.
He apparently realized that I still had not understood, so he asked one more question. The moment he said it, everything became clear.
“Do you have money?”
Now I understood. In my view, this was no longer inspection but an open demand for a bribe. There was little I could realistically do. I reached into my pocket with what must have been an expression of belated comprehension. He immediately pressed my hand down and asked what I was doing, pushing both my hand and the money into my backpack on the table. Another moment of disbelief: he knew perfectly well that soliciting money was wrong. Was he trying to keep it out of view of the cameras?
I searched through the cash inside the bag and drew out a ten-pound note. He looked dissatisfied, said “no, no, no,” and indicated the hundred-pound note instead. What choice did I have? I handed it over. He smiled and said, “My friend, now everything is fine.” My earphones were suddenly fine and went back into the bag. The toothbrush and eye mask underwent the same miraculous transformation. Then he let me through.
I was badly shaken and wanted only to leave before anything else happened. I was fortunate that I had exchanged some US dollars for Egyptian pounds on arrival. What if I had carried no local cash? Could he simply point to my dollars, declare those “not permitted,” and take them? What exactly was I supposed to do?
Sitting near the gate, I searched online and found numerous accounts from travelers who said they had encountered similar situations at Egyptian airports. Many described being pressured for money by security personnel. I also found people claiming that solo travelers who appeared to have no assistance were easier targets. In an unfamiliar country, was I really going to demand a supervisor and begin an argument? There was no guarantee whom the supervisor would support, and I was not eager to discover how much worse the situation could become.
Nor did I appear to be the only person affected that day. While I was sitting there, I overheard two Chinese women nearby discussing how they had just had money demanded from them as well.
The experience was not finished. In an airport restroom, after I washed my hands, there was soap and paper available beside the sink. A man who appeared to be a cleaner held soap out to me; I declined. When I went to dry my hands, he offered me a packet of tissues, and without thinking I took two. As I tried to leave, he blocked the doorway and held out his hand for a tip. He said only one word—“tip”—and nothing else. I began to suspect, unfairly perhaps, that he had reserved his entire English vocabulary for this particular business model.
Once again, money was being demanded. What was I supposed to do—start a fight in an airport restroom?
By then, my impression of Egypt had fallen into its lowest category. I had seen a cynical travel joke online: if you never visit Egypt, you will regret it for life; if you do visit, you will spend a lifetime regretting that instead. After those two encounters, the joke suddenly felt uncomfortably apt.
I looked up some figures available online at the time. Some put the monthly salary of a full professor at an Egyptian university at around EGP 20,000—roughly US$400, or about one-sixth of what an ordinary PhD student might receive in the United States. Now consider a purely hypothetical calculation: if this security worker worked twenty days a month and managed to extract 100 pounds from only ten people a day, his additional income would exceed that professor’s salary. How is that remotely reasonable? Shouldn’t this be cracked down on?
The flight to Luxor was uneventful, thankfully. The organizers had arranged accommodation at what was billed as a “luxury resort” on the Nile. It fell some distance short of what I would normally picture under that label, but it was clear that the organizers and local hosts had provided quite respectable conditions with what was available.
The hotel stood directly beside the river, with views of the Nile at night.
As a resort, it even had its own zoo. One of that year’s contest problems happened to use a zoo as its setting, so we went there to take a photograph for the problem statement—not the photograph below.
The organizers’ rest-day excursion began with a boat ride on the Nile. It was, honestly, an excellent experience. Sitting in a small boat with a light breeze does not sound extraordinary in itself. Remembering that the water beneath us was the Nile, traditionally regarded as the world’s longest river, made it feel considerably more consequential.
We then visited the Karnak Temple Complex. It felt as though the mysterious scenery of a film had entered the real world, and that a mummy might emerge at any moment.
Outside the official itinerary, the judges found a little spare time and arranged a private tour to the Valley of the Kings, the Valley of the Queens, and several nearby sites.
The sheer number of ancient sites in Egypt was remarkable.
Soon it was contest day. The broadcast set stood outdoors. It was atmospheric, though it also looked like an excellent place to meet a large number of mosquitoes.
The contest hall itself was a temporary structure. There may not have been a permanent venue anywhere in Egypt capable of holding two World Finals and more than 260 teams at once, so one had to be built. Imagine something like a gigantic, opaque, double-layered plastic greenhouse. The zones between the outer and middle layers belonged to staff and were inaccessible to contestants; inside the final layer was the enormous competition hall.
Whatever else one might say, the air conditioning was excellent. The hall remained impressively cool. Given the temperature outside, competing without it would have been deeply unpleasant.
The judges shared an office with the contest-system staff. “Office” understated its size; it resembled a university computer laboratory. The two groups traditionally seem to share a room because together they determine how the contest runs and how submissions are judged. If anything goes wrong, everyone needed for the discussion is close at hand.
The two World Finals used independent problem sets and numbering. Some problems appeared in both contests, but under separate identifiers, so looking at the other scoreboard did not reveal which problem corresponded to which. We had also thought carefully about selection. We wanted the problems unique to each contest to differ enough that the two champions could not be compared too directly. If the sets and contest trajectories had been nearly identical, and one champion finished a problem ahead of the other, spectators could easily have concluded that the winner on the “weaker” side had merely been fortunate that the strongest teams were elsewhere. Being mocked even after winning a World Finals would have made for a miserable experience.
As when I had attended as a coach, five hours sounded long in advance. In practice, one could stare at the scoreboard and discover that two hours had vanished. The contest passed remarkably quickly.
During the competition, I was invited to record a solution explanation for one problem. The video remains on the official World Finals YouTube channel.
Those five hours of judging were, ideally, very dull. Judges and problem authors do most of their work before the contest; if they suddenly have a great deal to do during it, something has gone wrong. Our most common task was receiving teams’ clarifications, debating English grammar, and eventually replying with no comment. The most entertaining clarification we received asked: “Every time I press 0 on my keyboard, the computer shuts down. Is there any hope?”
Fortunately, that had happened during the rehearsal the day before and had already been fixed. In the actual contest, the affected team would understandably have been raising every alarm available.
Finally, congratulations to Peking University for an extraordinary comeback and the championship. Their first solve of problem S at 276 minutes prompted the entire judge room to cheer. When they solved X at 292 minutes, the place erupted again—by “the place,” of course, I mean only the judge room. The on-site scoreboard was frozen, so the audience would see none of it until the reveal.
By comparison, the winner of the other World Finals felt almost anticlimactic to me. With problems of roughly similar difficulty, that champion finished one problem behind and appeared thoroughly overshadowed. The comparison we had hoped to avoid happened after all.
The closing and scoreboard-reveal ceremony was held in an open square before a temple more than 3,500 years old: the famous Mortuary Temple of Hatshepsut on Luxor’s West Bank, built beneath the cliffs. The stage stood directly in front of the temple, turning the ancient structure and cliff face into a remarkable backdrop. We had visited during the day. At night, however, the foreground lighting was so bright that the background was barely visible to the eye and almost impossible to photograph. Dinner was served during the ceremony. That evening’s food looked rather like the contents of one enormous communal stew pot.
Unfortunately, we judges already knew the result and had already celebrated, so the reveal itself was rather uneventful. Asking contestants on stage to guess their ranking was also painfully awkward; their expressions suggested that they would gladly have disappeared from the broadcast. Peking University’s penalty time was high, so the dramatic uncertainty of their comeback ended while the silver-medal places were still being revealed. Once their ten problems carried them into first, they never came down.
The day after the contest, everyone went home. I flew directly back to the United States without considering a day in Cairo. I had travelled all the way to Egypt and never seen the pyramids, which remains a genuine regret.
I later heard that one of the American judges took a 3 a.m. flight to Cairo the following day, joined a day tour, and then boarded an 8 p.m. flight back to the United States. He was already sixty. I could only admire both the stamina and the willingness to subject himself to that schedule—and wonder why the same idea had never occurred to me.
That story changed the way I approached later trips. Whenever I found myself somewhere new, I began by asking whether I could fit in something extra simply because I was already there. Travel is, after all, a form of willingly chosen inconvenience. There is no need to lock every hour in advance; sometimes it is better to follow one’s mood and improvise.
Back for the annual World Finals—for the third time this year.
That September, I was back for the annual World Finals—for the third time that year. It should have been once that year and twice the year before, but the Egypt contest had been moved into 2024 as well.
This was my third World Finals as a judge. I felt much calmer than before, as though it had already become part of the routine.
At the time, Chinese citizens could enter Kazakhstan without a visa. I assumed this would be my smoothest trip yet. International air travel promptly taught me otherwise.
I had originally booked a round trip on Lufthansa: San Francisco to Frankfurt, then onward to Astana. The uncertainty was the connection in Frankfurt, which required taking the airport train to another terminal. I could not determine whether that meant formally entering Germany. In theory, an international hub as large as Frankfurt surely had a fully enclosed transit zone with unrestricted access to the train. Yet after searching both the airline’s and the airport’s websites, I could find no definitive statement that my particular connection would be fine. Everything I read seemed to imply that there was a separate “international transit area” and that no entry formalities were required as long as one remained inside it. I was never entirely certain, but chose to trust that interpretation.
The larger problem came three weeks before departure: the return flight from Astana to Frankfurt was canceled. That invalidated the entire itinerary. Ordinarily, when one flight is canceled, the airline moves you to another departure. But there was only one flight that day. Taking the next day’s flight would not work either, because the onward service from Frankfurt to the United States was also on an every-other-day schedule. I would have been stuck at Frankfurt Airport for more than twenty-four hours. That was impossible for me.
The route was no longer viable, so I had to rebook everything. I received a full refund, but the process was troublesome, and airfares generally rise as departure approaches. I searched again and found no workable European connection for my own passport and visa situation. One option went through Britain but required changing airports; I did not have a British visa. Another involved twenty hours at Warsaw Airport, with the two legs operated by different airlines. I could not establish whether I would need to enter Poland, and I did not have a Schengen visa. Looking through those fares was deeply discouraging. Some well-timed options, including connections through Istanbul, had already disappeared because the date was so close.
Was that it? Was I simply not going?
Once I calmed down, I realized that Astana was almost exactly twelve hours ahead of San Francisco. Why not look in the other direction? I began searching for an eastbound route around the world, and there it was: the best place to “connect” was China. Google did not show such options because they were not really connections at all. They required separate tickets and, in all likelihood, entering the country. I searched independently for a round trip between the United States and China and another between China and Kazakhstan. The timings fit remarkably well, and entering China posed no problem for me. The decision was immediate. I booked it.
Beijing Airport saved the trip. Without that route, I doubt I would have reached the World Finals at all.
After considerable effort, I finally arrived in Astana. Talking with others, I learned that many had also been booked on the canceled flight and had rearranged their travel. Those carrying American passports had far more flexibility when connecting through Europe and avoided most of the complications I faced.
One notable change that year was the arrival of Gennady Korotkevich—tourist, then ranked number one in the world on Codeforces—on the judging team. Judging requires strong problem-solving ability, but not necessarily the ability to solve at competition speed. Many judges either do not compete online or do not have especially high ratings. As a result, when a judge occasionally explained what had happened during a contest on a forum, someone would ask, in effect, “And who are you?” That particular problem was unlikely to arise again.
It was also the first year that we used AI to generate illustrations for some of our problems. The results were excellent.
In the days before the contest, we found a free day for sightseeing in Astana. The main excursion was simply a walk to the Astana Grand Mosque.
It looked exactly like the photographs online. The interior was exceptionally intricate, and obtaining a photograph with no one in it was an achievement in itself.
On the walk back, we saw many posters like these along the street. I could not read the text, but the images appeared to advertise traditional Kazakh sporting events. A sincere question: does training an eagle count as a sport?
The opening ceremony was held in the main hall of the Presidential Center. Security was nearly as strict as at an airport. Since almost every bag had to be opened and inspected, the official advice was not to bring one. Given the schedule, however, contestants who had joined the preceding activities could hardly avoid carrying bags unless they handed them to their coaches to take back to the hotel. Many arrived with them.
I had skipped the earlier activities entirely and reached the venue very early. No one was there yet except the welcoming band.
I then watched the contestants arrive with their bags. An hour later, security was still processing them.
There is little to say about the opening ceremony itself. After attending more of them than I can count, they do begin to resemble one another.
The day before the contest, the organizers arranged another excursion, this time to something resembling a science museum. From outside, it looked like this: a spherical building whose stacked levels were visible through the exterior. Visitors took an elevator to the top, then descended one floor at a time through the exhibits.
Most of the explanatory text in the venue appeared in three languages: Kazakh, Russian, and English. Many of the staff spoke all three, which was impressive. I ran into a former assistant coach from my university who spoke Russian. I asked how different Russian and Kazakh were. To me, the alphabets looked similar—possibly because I could read neither. He said they were very different, entirely separate languages, and that he could not understand Kazakh at all.
This was the contest venue.
Inside were numerous entertainment areas and technology exhibits. That, too, is a long-standing tradition. Contestants can use them during the surrounding days; once competition begins, the coaches and assorted bystanders take over. Downstairs from our hotel there was even a yurt-like structure whose interior looked like this.
On a free afternoon, one could lie down in there and quite happily remain for the rest of the day.
By then, I thought the contest would proceed smoothly. The largest crisis arrived on the evening before it began.
I was at the hotel, had showered, and was preparing for bed. Three calls came while I was in the shower, all of which I missed. When I checked my phone afterward, the message was essentially: serious problem with a problem; come immediately. They called me because I was the author. I will not identify which problem it was. Readers familiar with the complete set may be able to work it out for themselves.
The situation began this way. On the day before the contest, we generally share the problems with the broadcast analysts so that they can learn what each asks and how it is solved. This allows them to record explanations in advance and analyze the contest more effectively while it is under way. The solution to this particular problem began with a case analysis: according to the greedy argument, there were only two cases. As the analysts recorded their explanation, however, the argument felt increasingly suspicious. Why, they asked, were there only two?
In the spirit of proper verification, someone wrote a brute-force solution that enumerated every possibility and selected the optimum. Its output did not match the official data. The brute-force program found a better answer.
That was bad. The exhaustive search was almost certainly right, which meant the official output was wrong and all the judges’ implementations were wrong with it.
It was nearly nine in the evening, with about twelve hours remaining before the contest. Calls went out, and many of us were summoned downstairs. We quickly discovered how easy the problem was to misunderstand. Every one of us who had solved it had independently and quite naturally overlooked the same additional case.
The senior members of the judging team considered how the problem might be changed quickly enough to rescue it. The rest of us asked whether it could be rescued without changing the statement at all.
Something similar had happened at an earlier World Finals. I was not a judge then, but later read the official post-contest analysis. According to that account, on the night before the contest the judges discovered that one problem was fundamentally wrong and could not be repaired, while the problem sets had already been printed, stapled, and sealed. They spent the night opening every packet, removing the staples, taking out the bad problem, inserting a replacement, stapling the set again, and resealing it. The work reportedly lasted nearly all night. By the end, everyone had become an expert staple remover.
Our situation did not appear quite that severe. The missed case mattered only within a particular portion of the input range. If we halved the range, the case would no longer need to be considered. The correction would even look unusually benign: given how the original bound was written, halving it on paper would resemble a simple printing correction rather than a substantive change to the problem. We could have fixed the issue without disrupting the contest, with only a general announcement at the venue.
The senior judges began calling the relevant people to explain that this might be necessary the following morning and that preparations should be made.
The rest of us continued asking whether the problem could survive unchanged. To our surprise, it could. We had indeed missed a case, but apparently only one. Adding it would not change the time complexity of the intended solution. Several of us began modifying our implementations. By then, it was ten o’clock.
Twenty minutes later, the first revised program was ready. Five minutes after that, mine was ready too. Over the next stretch of time, more implementations arrived, including some rewritten from scratch. We cross-checked them against one another and found no discrepancy. We then tested them on cases generated by the brute-force program, and those results matched as well. We now had a correct solution. The crisis had been contained.
We reran the entire dataset with the new judges’ implementation and added many tests for the newly identified case. By the time everything was complete, it was half past eleven. The good news was that no announcement was needed and the problem statement required no change; the issue had been resolved without affecting the contest at all. The bad news was that the problem had become considerably harder. The missing case was genuinely difficult to notice. If a submission failed during the contest, a team would have little way to know whether the implementation contained a bug or whether the underlying analysis had missed a case. If necessary, they might have to spend precious computer time—three contestants share a single machine—writing a brute-force solution for cross-checking.
The next morning, the contest began normally. As the problem author, I soon realized that it was much harder than I had originally imagined. Even setting aside the extra case, I had expected many teams to submit and then fail because of it. In reality, there were hardly any submissions at all. The first accepted solution did not arrive until three hours into the contest, making it one of the three hardest problems in the set.
We watched every submission to it closely. At the time, every team’s first attempt omitted the additional case. Not one succeeded immediately. The trap was every bit as effective as we had feared.
In other words, had we not found the issue the previous night, the contest might still have proceeded normally. No one would have noticed, and no team would likely have been affected, because no one identified the missing case before first receiving a wrong answer. Only much later, after the data became public, would someone probably have returned to perform the postmortem.
During the contest, a judge with time to spare gave the problems to several AI systems. If I remember correctly, they produced complete, correct programs for only two or perhaps three problems—and not even the easiest ones. At that point, their competitive-programming ability still varied wildly and clearly needed both greater consistency and further improvement. Who could have imagined that barely a year later, AI systems would be solving entire ICPC-style problem sets?
Finally, congratulations to Peking University on another championship. A penalty-time lead of nearly 300 was itself a display of strength.
The most painful result was Tsinghua University’s. They finished one test case short of their first world championship. Looking only at the scoreboard, an outsider would see two problems with wrong submissions and think the result unfortunate. As judges, however, we could see that on one of those problems their program failed only the final test case. We examined that test repeatedly and found nothing remarkable about it, yet they never located the bug. Had they corrected the failure and passed that submission, they would have solved one more problem and won the championship. It was extraordinarily close.
Several days of sightseeing around the World Finals in Baku.
For me, everything at that year’s World Finals finally went according to plan. Nothing went wrong from beginning to end—an outcome that had become surprisingly difficult to achieve.
As usual, the journey began with the visa. I was exempt, so I could skip that step entirely. I later heard that quite a few other people had trouble, not with the visa itself but with paying the fee. The website supposedly accepted credit cards online, yet each payment attempt was blocked by the card issuer’s fraud controls. Switching cards produced the same result. People eventually either found a card from a bank with unusually permissive controls or called customer service for help. In any case, it was tedious. I have no idea why the visa-payment site triggered so many alarms.
None of this had anything to do with me—or so I thought. Once I reached Baku, the problem came back to bite me. It was not specific to the visa site; it seemed to be a broader issue with Azerbaijani websites. More on that later.
I had learned my lesson in Egypt. Since I was making the trip, I intended to see the surrounding area. I arrived a day early, paid for the extra hotel night myself, and booked a day tour. I later realized that I had still been thinking too modestly. Someone else had arrived two weeks early and traveled through the nearby Caucasus—Azerbaijan, Georgia, and Armenia. To be honest, that struck me as somewhat risky, given that Azerbaijan and Armenia had still been at war only a few years earlier. By then, however, visiting each country separately at least appeared to present no particular problem.
Armenia provided another interesting footnote. Six months before Azerbaijan was officially announced as the host, Armenia had issued a notice saying it had submitted a bid for the 2025 World Finals. At the time there was almost no information online; searching Google for the 2025 venue mostly produced predictions that it would be Armenia. Azerbaijan ultimately got the event instead. Given the two countries’ recent history, one could not help wondering whether any of these developments were connected. I had no idea, but the sequence was certainly intriguing.
On my second day in Azerbaijan, I set out on the day tour. Our first stop was the Gobustan rock-art site, whose history reaches back thousands of years.
There I saw many unusual carvings.
There was also this image, which was fairly clearly not prehistoric.
We were told that snakes lived in the area, so the permitted paths were marked off with ropes. An unidentified green powder had also been scattered beside the paths, supposedly to repel them.
Next came the mud volcanoes. As the name suggests, these volcanoes erupt with mud.
The weather was intensely hot, yet the mud was cold. Our guide suggested touching it, so I did. Others in the group spread it over their arms and even their faces. Were they trying to turn a natural mud volcano into a facial treatment?
We then came to what is billed as the world’s first industrially drilled oil well, dating to 1846.
We also saw this enormous flag. I looked it up and discovered that it really had once held a world record. Somehow, it was a landmark in its own right. There was little wind that day, which made the flag difficult to photograph.
Next was Yanar Dag, the Burning Mountain, where natural flames burn continuously along the hillside. The mountain was, quite literally, on fire.
Then came Ateshgah, the Fire Temple, a religious site historically associated with fire-worship traditions. In the past, escaping natural gas kept flames burning there for years. According to our guide, the natural flame later went out, and the fire now burns on gas delivered through an underground pipe.
That concluded the day’s tour. We had managed to collect an impressive number of landmarks.
On the day before the contest, after all our work was complete, two Europeans and I decided to explore the city, with Baku’s Old City as the main destination. We began investigating how to get there, and the earlier payment problem came back to find me. We downloaded a local app and tried to buy some combination of transit card and metro tickets online. The credit card was declined immediately. Every attempt failed. Eventually we stopped trying and decided to go to the metro station and improvise.
How did one use the metro? None of us knew. According to my companions, working that out was part of the journey. We walked toward the station. Along the way, some local Azerbaijani students stopped us and asked how to improve at competitive programming. We offered a variety of familiar advice, all of which eventually reduced to the same conclusion: practice more.
Their uncertainty was understandable. New students always go through that stage. Codeforces now contains well over ten thousand problems even before Gym is counted. The scale alone can be discouraging.
At the metro station, we discovered that tickets could only be purchased with cash. We had none. A passerby saw the three of us looking thoroughly confused and gave us a metro card with exactly enough credit for two rides. We did not really understand what he said; he simply handed us the card.
We still needed two more fares. That meant finding an ATM outside and withdrawing the equivalent of roughly twenty dollars. At that amount, the debit-card fee may well have exceeded the money we withdrew.
We took the metro to Baku’s Old City and spent an hour exploring on foot.
Once we finished, it was time to decide how to return. The two Europeans thought the weather was pleasant and proposed walking back. So the three of us set out for the hotel. In my view it was extremely hot, the sun was fierce, and I had not applied sunscreen. They appeared entirely unconcerned.
Along the way, we passed several buildings with striking designs.
The most remarkable recent example, however, was the Heydar Aliyev Center beside the contest venue. By comparison, the venue itself hardly seemed worth photographing.
Contest day arrived without incident.
There was no one outside the venue, so I took the opportunity for a photograph.
The contest itself also concluded without incident. Congratulations to St. Petersburg State University, the only team to solve eleven problems, on winning the championship. Their ability to solve the problem designed to prevent an early sweep showed that the title was thoroughly deserved.
That problem had been in preparation since the previous year and was one of two intended to keep even the strongest teams busy until late in the contest. Before the 2024 event, we concluded that it was nowhere near ready and held it back. After another year of preparation and simplification, many of the more complex cases in its original form had been removed. As the problem author put it, “We have done everything we can to make this problem solvable.” Then someone solved it. One should never underestimate the strength of a World Finals team.
Another notable feature of that World Finals was that AI systems had applied to take part in an unofficial evaluation alongside the contest. The organizers provided OpenAI and Google DeepMind with separate judging machines so that each could work through the contest independently. What followed was decisive. Google DeepMind began extremely well and quickly solved ten problems, by which point the organizers were already becoming nervous. OpenAI then swept the entire problem set—AK’d the contest—and the comparison was no longer close. The organizers required both companies to wait until two weeks after the contest before publishing results and details. My guess was that they did not want the AI results to take attention away from the student competitors.
I later spoke with people from Google DeepMind. Given the level AI had reached, perhaps AI companies should no longer be applying for permission to participate. Instead, the organizers would need to provide a dedicated platform for AI entrants. How quickly the tables had turned.
The story continued a month after the contest, when we decided to hold a retrospective meeting. We had not held one even after the major crisis the previous year, so this meeting conveniently covered that as well. The central question was how we had managed to produce so many problems for ourselves. The conclusion was that more people should review the candidates during problem selection. We therefore decided to add members to the problem selection committee.
First, tourist clearly needed to join. His breadth of experience made him especially good at spotting issues—particularly if a similar problem had appeared in another contest, something he was more likely than anyone else to recognize. Most of the other judges rarely competed online.
One senior judge then suggested simply adding every judge from that year’s contest. Another pointed out that the discussion would become unmanageable when the final problem set had to be selected. The eventual decision was that everyone else could volunteer.
So I volunteered. It turned out that I was the only volunteer, which was mildly awkward.