Looking back at the past few years, I've spent a considerable amount of time doing competitive programming, with my fair share of failures and successes. Now that I consider myself as a "retired" competitive programmer, I've decided to reflect on the journey I've taken in competitive programming.
How it all started
The first time I learned about competitive programming was in Grade 9, at my school's CS Club. Through the Wednesday after school Google meets, I learned for the first time what a graph (in graph theory) was and implemented my first BFS.
I also learned about the Canadian Computing Competition (CCC), and with the abundance of free time I had, I solved some problems for fun on DMOJ.
CCC Junior 2021 would be my first of many programming contests. Making it onto the honour roll with a score of 69/75, I got an extra boost of motivation to keep grinding on DMOJ and learning new algorithms.
My first year on DMOJ
In the summer after grade 9, I did a lot of problems for fun. As I was still a beginner, I made quick progress, hitting milestones like top 1000 in ranking and solving my first 12 pointer on DMOJ. I also switched to using C++ from Python, learning from online resources like William Lin's contest videos.
EGOI training camp
In grade 10, I did the CCC Senior. After tunnelling into S3 and only getting 6 points from that problem, I felt I could've done better (you'll see that this is a recurring theme). While I knew I wouldn't make it onto the honour roll, I couldn't have predicted the impact my first CCC would have on my competitive programming journey.
In March, I received an invitation from the CEMC to the European Girls' Olympiad in Informatics (EGOI) training camp. I'd actually never heard of EGOI before this email invitation, since it was only in its 2nd year running, but nonetheless, I was excited about this opportunity.
The training camp was fully online, but I couldn't make most of the lessons and activities since I had soccer practice at the same time every week. However, I still benefited from the resources and slideshows from our EGOI coach (and IOI medallist), Ava Pun. I also got to chat with fellow competitive programmers through the training camp.
Outside of lessons and activities, we had two team selection contests (which I skipped soccer practice for), both 1.5 hours in length. I thought I did ok on both contests, but since there were no public scoreboards, I didn't know how I placed compared to everyone else. It was just a week after the second team selection contest, when I received a text from my friend: "Congrats on EGOI!!". It caught me completely by surprise, and sure enough, I saw the announcement that I was one of the four girls representing Canada at EGOI.
The spring after making onto the EGOI team, I was super busy with all the extracurriculars I signed up for (rep soccer, school orchestras, event organizing), leaving barely any time for practicing for contests. For me personally, this was one of the first times I had to learn how to effectively manage my time, since I always had a lot of free time during the pandemic.
In July, I didn't practice as much as I should've, but in August, I focused a lot on getting better at dynamic programming (my weakest problem type at the time) as well as learning data structures like the BIT. I also got the chance to meet the Canadian IOI team in their last few days of preparation before the IOI.
As the school year started, I struggled to find time to practice for EGOI. I felt a significant increase in workload and pressure from grade 10 to grade 11. September quickly passed by, and soon, we'd be travelling to Antalya, Turkiye for EGOI.
EGOI 2022
I'm extremely grateful to the University of Waterloo for the opportunity to compete in EGOI; travelling to Turkiye for EGOI was one of the best weeks I've had in high school.
When we weren't writing the contest, we were:
- exploring beautiful areas around Antalya, including tourist attractions like the Aspendos Theatre
- eating delicious food served at the hotel, including a variety of Turkish desserts
- or meeting talented competitive programmers from different countries, where I learned a lot about different cultures
We also:
- got played tricks on before getting ice cream
- saw stray cats everywhere
Visiting Aspendos Theatre after our contest days. Credit: Ava Pun
In terms of contest performance, I felt quite disappointed by my score on the first contest day. Maybe it was the pressure, or not being used to the contest environment, but ultimately I felt it was because I didn't prepare well enough for EGOI. In between the contest days, we had a boat trip to see sights around Turkiye, which also gave me time to relax and reset; I felt a bit more ready for Day 2. I scored a lot better on Day 2, but I was still pretty far from the medal cutoff due to my score from Day 1.
One of our sights during the boat trip. Credit: Ava Pun
As much as I enjoyed my time in Turkiye, the week after EGOI was one of the toughest weeks for me in all of high school. Exhausted from the flight back and jetlag, I had a week's worth of work to catch up on, in a busy grade 11 school year. The additional work and stress definitely didn't help the pressure I was already feeling before the competition. Add to that the feeling that I didn't do as well as I could've.
While part of me was determined to do better the following year, in the weeks after EGOI, I had no time, energy, nor motivation to solve any problems.
Advent of Code 2022
Fast forward to December 1st, the start of the annual Advent of Code. My friends and I did Day 1's Advent of Code in our first period Strings class, in what would become a "friendly" competition over the next weeks.
I set up a private leaderboard on Advent of Code and shared it in the CS Club Google Classroom. Long story short, we were a bit overly competitive sometimes, such as staying up until midnight to get first place, but it helped me regain my motivation for solving problems again. My proudest achievement is beating all the cracked 05's.
I made it onto top 1000 for Day 4, after staying up until midnight. I made a silly typo that cost me 2 minutes 😑
The second half of grade 11
Before EGOI, solving problems and doing contests was always an individual hobby, but with friends I made on the EGOI team and training camp, I could now discuss problems and compete in contests with others, which greatly increased my interest in programming contests.
In December, I competed in my first USA Computing Olympiad (USACO) contest, advancing to the Silver division with a score of 788/1000. I also did multiple DMOJ contests that month, reaching a purple rating of 1714 by the end of winter break. Me every time I saw a DMOJ rated contest: 😍.
I went back to solving problems regularly before CCC 2023. And before I knew it, it was already time for the CCC.
Another CCC, another ad hoc S3 (my least favourite problem type). I wasn't able to fully solve S3, but this time around, I got enough subtasks from S4 to just make it onto the honour roll.
About a week after the CCC, I decided to start a spreadsheet for tracking down problems I've done and the time I used each day for thinking about or solving problems. In particular, I was inspired by Colin Galen's videos on how to improve more efficiently, and the format was inspired by this spreadsheet (from @linyirun on DMOJ Discord).
Screenshot from my CP log
Yet, as the CCC results were officially announced, so did the announcement that Canada wouldn't be sending a team to EGOI this year. While competing at EGOI was never my only goal, I felt disappointed that I couldn't "redeem" my previous performance this year. To cope, I even said I was going to retire (I knew I wasn't going to, at least not that early).
From March to mid-April, I did more problems from DMOJ and the CSES problem set. I participated in the USACO Open (where I fried my brain cells and was still stuck in Silver), as well as any rated contests on DMOJ.
In late April, I got busy with playing on the school's varsity soccer team, practicing violin for recitals and orchestra performances, and stressing out about my AP Physics exam (I didn't end up studying much). On the coding side of things, I also got to building a new version of my personal website and attending JAMHacks 7. In the meantime, I took about a 2-month break from solving any contest problems.
In mid-June, I found that I had more time to solve problems, as many of my extracurriculars were done for the school year. I continued solving more problems from DMOJ and the CSES problem set, as well as targeted practice for constructive and ad-hoc problems (still my worst problem type). I also did past USACO problems from the USACO guide, hoping to advance to the Gold division in the next USACO season.
The summer grind
As summer break started, I averaged about 2 hours / day solving problems and doing contests. I targeted past USACO problems, the graph theory and dynamic programming sections of the CSES problem set, and other random problem sets. On July 7th, I competed in a Codeforces contest for the first time... and secured a gray newbie rating.
In past summer breaks, I always found that I gradually drifted towards working on software projects and learning new technologies. However, this time, I felt that I truly enjoyed the process of thinking about and solving problems, which filled up the empty days of summer break.
In mid-July, I watched EGOI 2023 pass by in the comfort of my own home, wishing I could've been competing in Sweden instead. I spent hours doing the EGOI problems, comparing solutions with a friend as we waited for the problems to be uploaded to an online judge. While I wasn't too happy about the first problem, I really enjoyed this interactive problem from EGOI 2023.
In August, I travelled to the other side of the world and spent time enjoying my vacation instead of solving problems for hours. However, I blocked out 3 hours of time for Yet Another Contest 7, sitting in a quiet corner of a public library with my notebook and laptop. After this contest, I made it past 1900 rating and acquired a golden handle of a DMOJ Master!
My senior year
After Grade 12 started, I found I had barely time to immerse myself in solving contest problems. I spent most of my time studying, writing university and scholarship applications, and whenever I had free time, I dedicated that towards planning JAMHacks 8. I'd still make time for doing contests on weekend mornings.
On December 17th, I finally made it past USACO Silver (rip to all the brain cells I fried in the process), getting a perfect score with 30 minutes left in the contest. The next day, I did a full day team programming contest in the region, and went home to do the USACO Gold contest the night of, before the contest window ended. Of course, I was already super tired by then and only managed to get some subtasks, but I later heard that the December USACO Gold contest was easier than usual.
Approaching my last ever CCC, I barely had time to prepare, as I was busy with school work, university applications, and other extracurriculars. And soon enough, it was time to write the CCC, for the last time.
Walking out of the contest room, I was extremely disappointed with my CCC score. I had focused too much time on S3 (which was another ad hoc problem), believing I was close to the solution, when I should've spent more time getting subtasks from S4 and S5. Furthermore, I felt that the past year of hard work went to waste — even though I felt like I improved as a competitive programmer, my score said otherwise. On the bright side, I barely made the honour roll (again), and was 1st in my school (since all the cracked 05s already graduated).
And that was it — even though I still did online programming contests here and there, CCC 2024 marked my last serious programming contest in high school. Like many competitive programmers I've known, I slowly went into "retirement".
Final thoughts
It's been quite the journey. Competitive programming has shaped a lot of who I am today, and I wouldn't be here today without all the failures and successes I've experienced throughout. These experiences have also made for great stories to tell, in my personal essays for English class and more.
Thanks for making it this far 🫶 If you're also into competitive programming, I'd love to hear your story — shoot me an email or find me on the DMOJ Discord (@minicube11).
As a final note: if you're an aspiring competitive programmer, I want to tell you that having fun is more important than practicing "perfectly". I used to worry about how I could optimize training for contests, but I've come to realize that if I'm enjoying the process, and as a result spend more time practicing, then I'll gradually improve.
Credit to Edward Xiao, Wanlin Li, Colin Galen for the inspiration.