Anhao Li
Ten Years of Competitive Programming — A Retirement MemoirBlur image

On 22 March 2026, with the end of the ICPC North American Championship (ICPC NAC), we secured a spot at the ICPC World Finals.

In the moment the contest ended, I wasn’t as thrilled as I’d imagined. No shouting, no sudden sense that my life was complete. Mostly it was something more tangled: relief that it was finally over, and a little reluctance that it really was over.

From the first time I touched competitive programming to reaching the World Finals, it’s been roughly ten years.

There is so much regret in those ten years, and so much that still doesn’t sit right. So many near misses, so many times it came down to a hair, so many post-mortems alone after a contest, thinking: if I hadn’t botched that problem, if that bug hadn’t eaten so much time, if the computer hadn’t frozen that day, if my head had been a little clearer — would it have ended differently?

Thankfully, in the very end, the ending wasn’t so bad.

And today, 21 June 2026, NiKo finally won his Major. Watching him lift the trophy, I suddenly wanted to write something of my own.

Competitive programming and CS are nothing alike, and I’m nowhere near qualified to compare myself to a professional. But I believe one emotion carries across: when you’ve stuck with something for many, many years, other people see a tournament, a title, a trophy — and only you know how many nights of solitary reflection are packed in there, how many failures, how many regrets, how many times you said “forget it” and then “one more try”.

So let me write about my ten years of competitive programming too.

Where to start.

Elementary school: a start by accident#

The first time I touched competitive programming was around fourth grade.

The school suddenly pulled a batch of students who were good at math to try out for informatics. I remember there being two or three rounds, but I only took the first. When I never got called for the later rounds I was quite scared, assuming I’d been cut in round one.

After all, I had a perfect record in elementary math and ranked near the top of the olympiad class. Looking back, being “near the top” in elementary school is a little funny, but at the time I was genuinely nervous. Eventually I couldn’t stand it and asked the informatics teacher — only to learn I hadn’t been cut at all. My round-one score had been high enough to get me in directly.

Looking back, I’m still very grateful to Ms. Chen. I certainly didn’t realize it then, but that tryout brought me into a world that would stay with me for at least the next ten years.

We started with Pascal, in that classic blue IDE. Thinking about it now, that interface is almost a symbol of an era. Informatics training had one very practical perk: I didn’t have to do morning exercises, and I could go to the training room at lunch. As for the actual training, I wasn’t doing anything productive. Given any opportunity I played games with friends — shooters, Minecraft. It was called training, but mostly it was gaming.

So in fourth and fifth grade my contest results were consistent: district and neighborhood contests, second prize pretty much every time. Informatics, to me, was a place where I could skip morning exercises, go to the lab at lunch, and hang out with friends. I had no real concept of what “competitive programming” actually was.

In sixth grade a teacher from the secondary school, Ms. Liu, came to coach us and had us register for NOIP 2016, junior division. I still remember scoring 87.5 in the preliminary round that year — apparently quite high, higher than many middle schoolers. Ms. Liu thought well of me because of it.

The final round only got me an ordinary second prize.

But that second prize meant something. If I remember right, it was the first NOIP junior division award our elementary school had ever won, and my first award above the district level. Not a first prize, not anything remarkable, but at least it suggested I could keep going down this road.

The district contest after that also left a strong impression.

Before it, my parents told me that if I didn’t place in the district top ten, I should stop.

Looking back now, I realize they had always been pushing — it didn’t start in middle or high school. I just hadn’t noticed in elementary school. Hearing that demand shocked me. I had always taken second prizes, with a USB stick as the prize; I was a reliably second-prize kind of competitor. Suddenly being required to place top ten in the district piled the pressure on fast.

In the end it went well: sixth in the district.

That result, plus consistently decent grades, got me a full scholarship to one of the better middle schools in the district. And there I became classmates with the person who had placed first in that district contest — cmd, who for many years afterwards was both rival and friend.

Middle school: the real start, and the real damage#

If that fourth-grade tryout was how I stumbled into informatics, the summer before middle school was when competitive programming really began for me.

That summer I met cmd. For years afterwards he was both rival and friend: classmate, then opponent, then someone I went through many contests with. Looking back, without that summer my trajectory might have been completely different.

That was when I genuinely learned binary search, binary searching on the answer, and so on. Basic material now, obviously, but at the time it was like a door opening. Programs weren’t just translating a statement into code (simple simulation) — there was structure behind these problems, patterns, ideas. Algorithms were interesting.

I recall that our teacher, Mr. Zhou, had been the ACM team captain at South China Normal. You could plainly tell his level was very high. What I’d seen of informatics before was mostly beginner drills; Mr. Zhou taught me many real algorithms, segment trees included. That was when I first sensed that “competitive programming” was a genuinely deep world, and when I started learning real algorithmic material.

In seventh grade I took NOIP 2017 junior division and scored 350, twelfth in the province among middle schoolers.

That was probably the first time I clearly realized I might actually have some talent for this.

My parents noticed too, of course.

So over the winter break of seventh grade, with almost no regard for how I felt, they transferred me to what was then considered the strongest OI middle school around. Even now, I think that decision affected me enormously.

Their logic was simple: if you have a talent for informatics, you should go where it’s strongest and get the best training. It sounds reasonable. The problem is that I was the one being transferred, and I was the one leaving my environment behind.

My old middle school had many friends, classmates and teachers I was close to. On the whole I preferred it — the atmosphere, the teachers, the relationships all suited me better. But because of what my parents wanted, I was moved anyway. More ironically, after the transfer I received no genuinely useful coaching. The only real benefit was being closer to the high school campus, which made it easier to train there later.

Beyond that, what the transfer mostly left me was a psychological drop.

Some of the teachers I met afterwards were very different from my old ones. Perhaps because they were older, they preferred to lean on authority, and I didn’t feel particularly respected as a student. One thing stuck with me: during evening study hall I merely had an algorithms book sitting on my desk — I wasn’t even reading it — and a teacher confiscated it. The provincial contest was coming up and I was already anxious; I had to sneak over when nobody was around to beg for it back. Being treated that way was genuinely miserable.

Looking back, the point where my personality started turning solitary was right around then.

I suddenly realized how powerless I was in front of my parents. It was my school, my friends, my life, and yet the person deciding never seemed to be me. For a student barely into middle school, that’s a fairly cruel thing to feel.

I didn’t fit into the new class and didn’t want to be on the middle school campus. So I started studying on my own more, training with students two years ahead of me, and going over to the high school campus at every opportunity.

To everyone else I probably looked like something of an oddball.

The seventh-grade provincial contest was basically a formality for me, nothing much to say. The real change came that summer. I started studying and training with the seniors heading into high school, and I found I could keep up. That mattered a lot at the time, because it meant I wasn’t only decent among my own age group. Even in a higher, stronger training environment, I wasn’t completely lost.

In eighth grade I entered NOIP senior division. I came back on Day 2 to score 427 and take a first prize. Not a high score by any measure, but for a middle schooler competing in the high school division, a senior division first prize was an important milestone for me at the time.

And my parents’ requirement was blunt: a senior division first prize is what counts as getting started in competitive programming, and if you can’t manage it by eighth grade there’s no hope, so there’s no point continuing.

Writing that sentence down still strikes me as absurd.

For an eighth grader, taking a first prize in the high school division is not an easy thing. But in their framework, it was merely “getting started”. Doing it barely proved I could keep going; failing would have meant I was worthless.

Over winter break I went to the Peking University camp, one and done, nothing to say.

What really hit me was the later announcement that I couldn’t compete in the provincial contest. That affected me badly. I had already competed in the high school division and won a senior division first prize. Plenty of high schoolers with lower scores could enter the provincial contest — but because I was a middle schooler, I couldn’t.

That was the first time I strongly felt that policy is always changing and isn’t something I can change. Before that I’d been naive enough to think that if I worked hard enough and did well enough, I’d get my chance. That incident taught me otherwise. Whether you get to keep going depends not only on whether you can solve problems or how strong you are, but on rules entirely outside your control.

Back then a senior division first prize was still enough to get into Sun Yat-sen University at the first-tier cutoff. All those paths and policies had looked close, and suddenly became far away. Missing the provincial contest, and GDKOI getting cancelled afterwards, hit me hard. From the second half of eighth grade I started going to English classes every weekend and began considering studying abroad.

I’d wanted to study abroad since I was small — my brother went to Singapore for high school. At that point it was still a vague notion. Looking back, that stretch probably planted the seed for actually leaving later on.

From the summer of eighth grade through ninth grade I took extended leave from classes to train, including a training camp at Zhenhai. Zhenhai was a shock.

There, for the first time, I clearly felt that a top school was on a completely different level from anything I’d seen. Three or four people competing in that one lab later made the national team. The atmosphere, the intensity, the abundance of resources — I hadn’t really seen anything like it. I might have thought I was doing all right, at least locally, at least among my peers. In that environment you discover very directly how genuinely strong people train, think, and compete.

I learned a lot from it, of course, and it also made me more anxious.

From ninth grade the pressure from my parents became enormous. They said plainly: if you can’t reach Tsinghua or Peking by ninth grade, stop.

That sounds outrageous now, but at the time it sat on me.

That year, right after class assignments — I made the key class — I still couldn’t build good relationships with classmates or teachers. I was often away training, and after the transfer I’d never had any sense of belonging. Much of the time I was neither a normal student nor anywhere close to a truly top OI competitor. Caught in between, my mood stayed low.

And the policies kept changing.

NOIP was scrapped outright and became CSP. I scored 413 on CSP-S, which I think would have been provincial top 30 excluding twelfth graders. Objectively that shouldn’t be bad, but I always felt my parents weren’t satisfied.

Later, at the Tsinghua camp, my first-prize-level offer got FST’d down to a third-prize offer, and I got chewed out badly again.

Then came the Strong Foundation Plan, the pandemic, one thing piling onto another — even studying abroad was blocked off by the pandemic, which drove my mood to rock bottom.

That was also when I started watching anime. Thinking about it now, that was largely escapism. There was too much in reality I couldn’t control: policy, parents, school, results, admissions pressure. Anime at least gave me a world I could duck into for a while.

At the ninth-grade provincial contest, I didn’t make the provincial team.

One problem involved Stirling numbers of the second kind, which I had read about two days before the contest, and during the contest I simply didn’t recall it. That kind of regret is typical: it’s not that you don’t know it — you’d literally just seen it — but you didn’t catch it in the moment.

After missing the provincial team I went back for the high school entrance exam and did terribly. I had no heart left for it.

And so middle school ended in a state of chaos, exhaustion, and low spirits.

If you only look at results, those three years look like steady progress: from a junior division second prize in elementary school to twelfth in the province in the junior division, a senior division first prize, near the top of the province in CSP-S, a lot of training camps, and meeting genuinely strong people.

But if you look at the person, I was slowly becoming lonely, sensitive, and repressed over those years.

I did confirm that I had talent for competitive programming, and I really started training systematically. At the same time I felt strongly, for the first time, that my life was not entirely mine to control.

That was middle school.

Competitive programming had truly begun, and I had truly been hurt.

High school: the most chaotic three years#

I entered high school carrying all of that.

I ran into many classmates from middle school. Seeing familiar faces should be reassuring, but at the time it was uncomfortable. I no longer really knew how to hold a normal conversation.

I avoided certain relationships — people I had known, and people who tried to get close and understand me. Looking back, I hurt a lot of old friends and classmates, hurt my parents, and hurt myself most of all.

But I can’t be too hard on who I was then.

Because I was lost, and I was unhappy.

I didn’t know where I should be heading, or whether I was persevering or just refusing to accept defeat. I looked like I was still doing contests, but internally everything was a mess. Much of the time I wasn’t moving forward seriously — I was avoiding a lot of things I didn’t know how to face.

The NOIP in tenth grade was the first big blow of my high school contest career. The first problem was a warm-up, but I printed a long long with %d, got a CE, and lost a hundred points outright. The result blew up into a second prize near the bottom.

That was my first second prize since starting secondary school. Worse, that one problem also set up my failure to make the provincial team that year.

My mood was very bad during that stretch. Every day I had no idea what I was doing or why I was still going. Contests had collapsed, so back to regular coursework. My parents didn’t scold me then; they just kept urging me to quit. Get a first prize in eleventh grade, they said, then go back and take the gaokao.

Which somehow made it worse.

The most painful part wasn’t being scolded — it was that they seemed to have already accepted I couldn’t do it, that this road should end. That was hard to take.

That was also when I started pushing back against my parents. I started arguing with them, opposing them. Before then I had mostly been arranged, pushed, required. In high school I finally started expressing, in a clumsy and violent way: I don’t want to do exactly what you say any more.

At the GDKOI afterwards I barely prepared and still placed 21st in the province. I barely prepared for WC either — I even slept for an hour after the contest started before I began writing. In the end I added an unnecessary optimization and blew a gold down to a silver. Not great results, but compared to the NOIP collapse in tenth grade, not terrible either. More like proof that I wasn’t completely finished.

I never really pulled myself together that winter break, though.

I got essentially nothing done, playing games to pass the time. The class-assignment arrangement I’d agreed on beforehand was torn up afterwards. Once again I felt that policies and arrangements weren’t mine to change. So after the term started I coasted in class.

Every day in a daze, not knowing what I was doing or thinking. Not really invested in contests, not really invested in coursework. My body was sitting there and my mind had drifted off somewhere.

Then, 21 days before the provincial contest, my coach suddenly told me I could compete.

Even now it feels dramatic. I had assumed there was no chance, and then right before the contest there suddenly was. My parents still wanted me to go back to class for a few days first and then apply for leave.

But this time there was no way I was listening. I picked up my laptop, went to the lab, and started training full time. Dramatically enough, those 21 days of preparation got me into the provincial top 16 (the provincial team cutoff) with the highest score in my school. And yet, because of that %d printing a long long back at NOIP, I still didn’t make the provincial team.

That one is genuinely hard to let go of. I performed well at the provincial contest, I had the highest score in the school, I was right there — and fate took it away over an output format in a warm-up problem months earlier.

And that was when my parents suddenly started relitigating it, blaming me for why my NOIP result had been so bad.

The feeling is hard to describe. They had urged me to quit and doubted me; then when 21 days got me to the provincial team cutoff, they turned around and blamed me for the earlier contest. As if no matter what I did, it would never be enough.

Then came NOI, for which I honestly wasn’t ready. The pressure was immense. During the contest I remember my hands shaking uncontrollably and being unable to catch my breath. It was the first time I truly felt pressure that large, the first time I felt like I couldn’t breathe in a contest hall.

I got a bronze.

Not a satisfying result, obviously. But more than the result, I remember the physical reaction. That kind of pressure isn’t “a bit nervous” — it genuinely squeezed the air out of me.

After that, under even more pressure, I took full leave from classes in eleventh grade to prepare for contests.

But the more I wanted to prove myself, the more the pressure built. The more I felt I couldn’t lose, the more ordinary my performances became.

That year’s provincial contest was dramatic again: my computer froze during the contest and swallowed my code.

And that was how my high school contest career ended.

Not with a good result, not with a final breakthrough, but in pressure, chaos, accident, and regret.

I was depressed for a long time afterwards.

Back on regular coursework in twelfth grade, I started talking to classmates and friends again. It was the first time I really lived like a normal high school student, and it was then that I discovered how kind everyone was.

That mattered a lot to me.

For a long time before that I had lived in an extremely closed-off state. I assumed most people wouldn’t understand me, that many relationships were beyond repair, that I could only be alone. But in twelfth grade I reconnected with a lot of classmates and felt some very ordinary, very precious kindness again.

I’m genuinely grateful to that group of high school classmates.

For many people twelfth grade is a painful memory. For me it was the relatively happy year of the three — less pressure than the years before, even. Because that was the year I slowly climbed out of that depressed state.

At the start I was still coasting, of course. On the low days I felt like I’d drifted off somewhere entirely. It wasn’t until forty or fifty days before the gaokao that something clicked and I started preparing seriously.

It was nearly starting from scratch.

Redoing the first and second rounds of practice books, filling in everything I’d missed. Looking back, that stretch actually felt rewarding. On some subjects I could gain 10 points in a week. That feeling gave me back a little confidence I hadn’t had in a long time: I can still make things happen; I’m not completely finished.

Though in the end the gaokao blew up on math, of all things — the subject I’d always been proudest of. Ironic. I never expected math to be what got me.

Even so, twelfth grade gave me some of myself back.

The early-admission slot for CS at Sun Yat-sen, which I’d thought was fairly safe, slipped away over lost points. Rattled, I filled in some arbitrary choices and ended up at a university that wasn’t good — though its ACM program was quite strong.

And that was the end of high school.

If middle school was where I truly began competitive programming and truly got hurt, high school was three years of struggling, breaking down, pushing back, avoiding, and slowly standing up again under pressure.

My OI career didn’t have a satisfying ending.

There were plenty of dumb mistakes, plenty of policy changes, plenty of things I couldn’t control, and plenty of my own avoidance and disorder. Even today I can’t say I’ve fully made peace with it.

But at least that last stretch of high school taught me one thing: walking a road badly doesn’t mean I’m finished.

I can still start over.

University: from running away to starting again#

After the gaokao I went to a university I wasn’t happy with.

Objectively it wasn’t a good school. But its ACM program was quite strong. Maybe because of that, I was quickly put in a somewhat special position and made head captain for my year.

It sounds impressive; at the time it was mostly irritating.

Freshman year the team had heavy training obligations — arrangements, forming teams, training, contests, all of it taking energy. And my mind wasn’t on ACM.

I was grinding my GPA while preparing for language tests and applications to schools in the US and Singapore. I got my GPA to first in the major, and kept wondering whether to do research and in what direction.

ACM, to me, was mostly something to get through. I could tell the coach and the school had high expectations — with an OI background and contest experience, I should have been able to keep producing results in ACM.

But I knew perfectly well I didn’t want to stay there.

That left me feeling guilty for a long time afterwards. Like I’d let down the coach, the school, and my teammates.

Ironically enough, my former teammate also made WF this year. If we meet at the end of the year, I might be called to account.

Freshman year passed like that.

I didn’t put much time into ACM and didn’t produce anything impressive. I was even a little averse to ACM and ICPC then. After everything that happened with OI in high school, my feelings toward competition were no longer pure. It stopped being something that excited me and became a burden, a route, a tool for medals, admissions, jobs, and proving myself.

I remember a teammate asking me during a contest:

“Why do you do competitive programming?”

I answered without thinking:

“To get a job, obviously. What else is a medal good for?”

He paused, then said:

“Can’t you just like it? Isn’t it fun?”

I hesitated too.

But I quickly put it out of my mind.

After the contest I went back to preparing to study abroad, grinding language tests, grinding my GPA, thinking about research and career plans and where to go next. The meaning of competition no longer seemed to matter. And so that question got buried in a corner of my memory.

Until later, when I came to the US.

Only after arriving did I start thinking about it again.

Coursework was heavier than before. On top of classes there was everything else: adjusting to a new environment, running my own life, thinking about internships, the future, what I actually wanted to do.

By rights I should have had even less time for ICPC.

And in fact, sophomore year’s ICPC results weren’t good.

I’d wanted to team up with a classmate who had an IOI silver, but he seemed to have been hurt by competition too and didn’t want to compete any more. I understood him completely in that moment, because I had spent a long time not wanting to touch it either.

Sometimes the people who truly loved something are the easiest for it to hurt.

I put a team together with two others, took a regional gold, did quite poorly at nationals, and that was that.

That was sophomore year. Then in junior year, three or four months before nationals, it suddenly hit me: maybe this really is the only chance I’ll ever get.

OI in high school hadn’t had a dignified ending. In my early university years I’d been running from ACM. If I didn’t prepare seriously this time, my competitive career really might end in a slapdash state.

So I started training again.

I went back to logging my training daily: which problems I did, which I upsolved, what I couldn’t do, where I was still short. All of it written down bit by bit.

More importantly, I faced the contest that had ended my high school career.

That contest had left me with a lot of regret. It didn’t just end my high school competitive career — it also made me unwilling to look back for a long time. But this time I upsolved those problems. And that was when I genuinely made peace with my past self.

I can’t go back to that contest hall, and I can’t change what happened. The dumb mistakes, the policy changes, the computer failure, the collapse under pressure — they all already happened.

But at least, years later, I can face them again from a calmer place.

And then came ICPC NAC this March.

In the last hour I held up under the pressure, solved two problems back to back, sped through an algorithm I hadn’t written in over five years, and was the one the team could count on.

Ninth in North America, qualified for the World Finals.

When the result actually arrived, I felt something hard to describe. It certainly isn’t an ending perfect enough to erase every regret. But it was enough for me.

Because I finally got a reasonably dignified full stop before competitive programming ended.

From stumbling into informatics in fourth grade, to confirming in middle school that I might have some talent, to struggling, collapsing, and exiting through OI in high school, to picking ICPC back up in university — this road took far too long, and detoured far too far.

I used to think I no longer liked competition.

I used to think competition was just for admissions, jobs, a résumé, opportunities — what else is a medal good for?

But when I started logging training again in junior year, upsolving the problems that had once retired me, sitting back down in a contest hall, I think I finally started to understand the question my teammate asked me.

“Can’t you just like it? Isn’t it fun?”

Maybe the answer is yes.

It just took me many years to remember that, and to be able to say yes and mean it.

I probably won’t prepare seriously for WF. It’ll be a social trip, a bit of travel, one last farewell to this world of competitive programming.

So NAC was probably my last serious contest as a competitive programming “professional”.

And this time, the ending wasn’t bad.

It doesn’t fully make up for those high school regrets, but at least I’m not leaving with only regret.

So here, my competitive programming career can finally take a full stop that isn’t too bad.

I used to think competitive programming only gave me awards, admissions, and a résumé. Later I found it also gave me a rare kind of joy: the pure pleasure of solving problems.

Over these ten years it hurt me, of course, and so did plenty of things outside of it. But in the end I’m willing to admit: I did love it.

And being able to leave my last serious contest as a World Finalist is, to me, more than good enough.

Maybe there’ll be a Coda chapter. Who knows.

But for now, the CC chapter should be closing.

Ten Years of Competitive Programming — A Retirement Memoir
https://www.lomit.top/en/blog/icpc/%E6%88%91%E7%9A%84%E5%8D%81%E5%B9%B4%E7%AE%97%E6%B3%95%E7%AB%9E%E8%B5%9B%E9%80%80%E5%BD%B9%E5%9B%9E%E5%BF%86%E5%BD%95
Author Anhao Li
Published at June 21, 2026