I participated in UCPC 2025.

Through diordhd, who was my teammate in last year’s ICPC, we formed a team with TLEwpdus, diordhd, and daniel604. I never imagined I’d get to compete with an LGM—this might be the greatest stroke of luck since I started competitive programming. Knowing that opportunities to team up with someone as skilled and experienced as TLEwpdus are rare, I was eager to learn as much as possible.

Thanks to TLEwpdus’s naming sense, our team name was 인공지능 사용 적발 시 실격 처리 됩니다 (You will be disqualified if caught using AI), and our team member names were Yann LeCun, Yoshua Bengio, and Geoffrey Hinton respectively. (I was in charge of Geoffrey Hinton.)

Preliminary Round

scoreboard1

Donghyun diordhd took A ~ D, Jeyeon TLEwpdus took E ~ H, and I took I ~ K to start the contest.

We each pushed through A, B, D, E, G, H, I (Jeyeon’s first solve on H!), and C was solved after Jeyeon and Donghyun shared some ideas. (Actually, I missed who solved it and how.) For F, Jeyeon got TLE with a 2D Fenwick tree, realized there was a non-2D solution, and got it accepted after resubmission. Meanwhile, Donghyun and I came up with an idea for J and submitted it, but missed an edge case and got it right after 2 wrong answers. With about an hour left, we all thought about K together, and Jeyeon discovered it could be solved using the diameter of a tree, but we couldn’t solve it because we missed the observation that distances to different diameters weren’t many. Actually, Jeyeon said we could use this problem, but we didn’t have enough time and couldn’t code it, so we submitted the link to that problem(?).

After the contest, I upsolved C, F, and G, and it was reassuring to have teammates who easily pushed through them. F in particular had quite a tight time limit.

Team Practice

A week after the preliminary round, we practiced with a 5-hour set CERC 2023 to get used to the finals format with one computer. From my perspective, Jeyeon solved problem C, mentioning it was well-known, and the solution was beautiful. I struggled with problem J’s implementation and couldn’t solve it—I went into the problem overconfident without thinking through the implementation carefully, and my concentration faltered as edge cases kept appearing. This reinforced how important it is to plan carefully before implementing.

Finals

Since sponsor booths were operating before the contest started, I went about an hour early to look around the booths and received various souvenirs. (The UCPC shirt was pink this time, and I liked the color.)

scoreboard2

In the order we sat in the contest hall, Jeyeon TLEwpdus took A ~ E, Donghyun diordhd took F ~ I, and I took J ~ M to start the contest.

I read through my assigned problems but couldn’t come up with any solid approaches. For M, I thought I might be able to construct a solution through casework, but after sketching some ideas, it didn’t seem to work out. Meanwhile, my teammates pushed through B, C, E, and I (Jeyeon’s first solve on B!), and I listened to Donghyun’s approach for H. H had an absurd number of cases and required construction—the implementation was so daunting it made me miss dlwocks31. While Donghyun started implementing H, Jeyeon and I looked at A together. We initially approached it with DP, but Jeyeon suddenly realized it could be constructed with just (number of leaves)/2 and submitted. Meanwhile, I worked on K and observed that we could divide cases by considering pairs. Jeyeon coded a solution managing lines similar to slope trick and submitted, but got WA. Fortunately, we found a counterexample and got AC after resubmission. Just then, Donghyun finally finished H (after even writing stress tests!), and things started flowing smoothly!

After solving H, with about 40 minutes left, we all decided to watch Jeyeon code G. We submitted with 5 minutes left before the end but got WA, and after realizing we forgot to call init(), we quickly resubmitted and got it accepted. When Accepted!! actually appeared, it was 2 minutes before the end, so we all put our arms around each other and rejoiced. When solving the last problem, it seemed like the moment when Jeyeon’s composure shone. The moment of debugging while repeatedly Alt-Tabbing after submitting was… really impressive.

We finished 3rd place overall and received the 2nd place prize, and the process of revealing the scoreboard was really thrilling as many teams solved problems after the scoreboard freeze.

Conclusion

This was my first time winning an award. The computer had almost no idle time, and our teamwork was perfect—we constantly verified each other’s ideas and implementations. It was an incredibly satisfying and happy contest. I’d love to compete with them again, but this was Donghyun’s final contest, so we won’t be able to team up anymore. (I’ll still compete with Jeyeon at NYPC!) Since last year’s ICPC, whenever we were stuck, I’d often wait for Donghyun to come up with a creative breakthrough… but that won’t be possible anymore. Still, I’m proud we could win together at his final contest. I wish both Donghyun and Jeyeon all the best in their future endeavors!