2025 ICPC Nanjing Travelogue
Day -1
For some reason, I’ve been particularly fond of Jay Chou’s early songs lately, namely the কয়েকজন albums before '05, even though I used to prefer his songs from '06 to '10. They’re about the same age as me now. I feel these old-school songs have a faint yet mellow sadness to them, whereas his new songs in recent years are a bit exaggerated and frivolous. Among the old songs, Sunny Day is the most classic. For the first few years after I got to know him in middle school, I didn’t find it all that stunning, yet now I have become the very person in the melody.
My body felt terrible all morning, an indescribable discomfort, probably just too exhausted from the vp last night. Still, I’m currently planning to do a CF round tonight.
Day 0
November 7th, 2 AM, Hangzhou, clear skies. My heart feels so calm.
As long as I get a >=+40 rating change, I’m pretty happy, and I achieved that goal tonight. Even though E was far less difficult than I imagined—dXqwq even coded it up in five minutes. Apparently you just run a DSU based on the degrees and calculate a bit. Turns out it was neither a Kruskal reconstruction tree nor an Eulerian path… My mind even wandered to Prim’s algorithm.
I suppose I’ve realized once again that there are hard things in this world: inverted delusions. 99% of things are hard, the missing tools in 99% of ideas cannot be realized, and 99% of approaches cannot guarantee correctness.
Only that tiny fraction of things is doable. What we can do, and need to do, is by no means accomplishing the impossible, but merely finding what can be done; once found, it is naturally accomplished. Or rather, what we need is to realize that we are trying to do the impossible and immediately abandon the attempt—and sometimes, to stop this self-deception.
This requires rapid and constant self-subversion in one’s thinking.
Anyway, the late-night snack was delicious.
Where there is a will, there is a way. This saying is completely wrong. Only things that conform to scientific laws can succeed. Most of the things people want to do, no matter how hard they try, cannot succeed. What we must do is eliminate the ninety-nine things that cannot succeed out of a hundred, and find that single one that can. This is hard, but we must do it!
—— Supernova Era
It’s evening now. Just took a shower, and for some reason, I feel very excited. At least more excited than I was for the two regionals last year.
Day 1
Coach Han gave us a lot of advice last night. The night before, I transcribed the coach’s words, printed out a copy of Precautions and Methodology, and brought it to the contest venue on both days. Right now it should be sitting at our seats in the training team’s classroom.
Woke up past seven in the morning. Went downstairs, divided the luggage with my teammates, and took a cab to the East Station. After arriving at noon, we found the hotel was right near the subway station, very close. There was a weird smell in the room, but it was fine—after all, it was a single room for myself, much better than the dorm environment…
Checked in, picked up the supplies, took group photos. Personally, I think the Nanjing site uniforms look really nice. Too bad we went late and the prizes for the trivia quiz were all gone.
Speaking of which, I still haven’t seen my brother the whole time, sigh.
When the practice session started, lyc pressed F4 and sent the computer into tty mode, though it recovered after a reboot with the help of a volunteer.
Today is lyc’s birthday! fpy, I, and his old friends had a meal of claypot chicken together, and ate cake too~ It tasted really good~ Plus it was my first time trying it, and the portions were huge~
Boohoo, having friends to celebrate your birthday with is truly so wonderful! Right then and there, I secretly made up my mind that I must invite her to my birthday next week.
Day 2
I think we left the hotel a bit past eight.
F
Right from the start, the first problem I looked at was F. The problem statement was very short, and after reading it I immediately realized this was definitely a doable problem, and very likely to be solved early on. But that’s when my agony began, because I didn’t have any immediate ideas—especially for problems like this involving dynamic graphs, online queries, connectivity, and such; I felt like I had almost never encountered an easy one of this kind. It also involved bitwise operations. So I started praying that I was just underestimating the difficulty of this problem.
But the most agonizing part was that jiangly solved this problem at the 8-minute mark!
As a result, this problem showed up on the board as an easy problem. Since it’s an easy problem, and jiangly coded it up in such a short amount of time, how could the solution possibly be building 4096 DSUs…? From then on, I was constantly wavering between two trains of thought: “There must be a simpler way!” and “Maybe this problem really is quite complicated?”, going around in circles endlessly.
First, I tried an approach of building 12 DSUs bit by bit, but it couldn’t handle multiple edges at all, because multiple edges would require undoing the connectivity of lower-level nodes. At the time, fpy talked me out of it, saying that a rollback DSU would make it at least a black-rated problem, which was unlikely—and that was indeed true. This approach was something like . The complexity was fine, but the correctness wasn’t. By the time I submitted it, the clock had already reached 3:09:01.
Then I tried an approach that enumerates subsets: for the weight of a newly added edge, enumerate all of its subsets, then connect the DSUs corresponding to those subsets, and for queries, just check all of them. Correctness was absolutely guaranteed, but the complexity wasn’t—it was . The time reached 4:29:53.
And with that, Problem F completely collapsed. Affected by F, I barely looked at any other problems the entire time.
After the scoreboard froze, I tried an approach where for a newly added edge weight, I only enumerated its distinct binary suffixes. I remember it couldn’t even pass the sample cases at first, and only passed after I added something or other—I can’t remember what. The time reached 4:55:00.
K
Next, let’s talk about K. A Chinese chess problem asking whether there exists a strategy such that the chariot is guaranteed to capture the horse. All I can say is that it’s a trivial one-glance problem: if the horse still can’t escape after making one move, then it will definitely be captured. You just enumerate the eight directions and check.
I remember lyc seemed to be looking at this problem right from the start, but he kept being unsure whether the conclusion above was correct? After I finished writing C and assured him that the conclusion was right, he went ahead to code it, I think. But he actually wrote a dfs that returns when dep==2, which was pretty hard not to laugh at. Since it was a gimme problem, he seemed to spend quite a long time debugging it. So after sorting out the implementation details, I kicked him off the keyboard and went to code it myself. Felt pretty fast, finished it in a dozen lines or so, though I also spent a little while debugging. The time reached 00:59:44.
fpy seemed to be looking at the earlier kangaroo problem at first, though he quickly switched to F later on as well, and was trying hard the whole time to communicate with me about approaches for F. But I was a bit anxious at the time—my head was both completely empty and completely full, and I just couldn’t take anything in.
Problem C was also handed to me by fpy. He said it was super obvious at the time. I took a look, and indeed: an even number can always be split in half, and an odd number can never equal an even number times an odd number. And just like that, it was done.
G
Of course, in the end, we were redeemed by lyc. Thank you LYC! He solved Problem G at 3:48:02, saving us from the doom of striking iron. Actually, by this point, even if we had solved F, we wouldn’t have gotten a silver medal anyway. We only realized this after the contest ended.
He said Problem G was very simple. Seems like he got a WA at first because of some bound issue. I don’t know, I was out of it the entire time.
After solving G, lyc also gave me an approach for Problem I. The problem seemed to be about finding ppap. He said to enumerate two boundaries in , use KMP to calculate the boundaries, and then enumerate the inside once more and just keep a count. Since I usually code faster, he tried explaining it to me several times so I could write it, though I didn’t really understand it in the end. Later he also realized the first part was actually , so it wouldn’t work.
Afterwards, lyc told me that Problem I might have been more promising than Problem F. Problem F was seriously such a trap.
After it ended, I stuffed the little kangaroo into my pocket and hurried off to Nanjing South Station without staying for the awards ceremony.,

After
Depressed? Depressed. Very depressed, terribly depressed. Yet there’s also a sense of relief. Maybe I won’t obsess over rating as much when I play cf in the future.
Retiring? Seems like four people have asked me if I’m going to retire. How do I put it? I don’t know. Even though it’s already the 18th now, I still don’t know. I feel like there’s a damn high chance I’ll be persuaded to quit by the coach, what do I do…
Speaking of being persuaded to quit, while chatting on the road afterwards, fpy said that hyl was persuaded to quit by the coach back then because she was stuck at green for two years. What kind of rumor is this? I always thought she quit on her own because she didn’t perform well in the HDU Spring camp. Sigh, after all, her performance in the 2024 freshman contest was really dazzling.
However, I still believe that hyl did the wrong thing. Because at the time her actions were closely tied to my own interests, and due to other factors, I have far, far too many reasons not to forgive her.
Come to think of it, there’s a relatively high chance lyc will retire, while my personal guess is that fpy probably won’t.
Speaking of which, I don’t even want to upsolve the problems from this contest—gives me a bit of PTSD, so to speak. Of course, there will be chances to upsolve them later.
The contest result really does conform quite well to scientific laws, doesn’t it? In the weeks before the contest, we vp’d at least five CCPC and ICPC regionals, and except for getting silver in the Hong Kong site, every single one of them was a bronze medal, without exception. Doesn’t that say it all? Overperforming would be what violates science.
(On a side note, that RainbowChicken place near the Wisteria Garden Hotel at Cuipingshan Subway Station is seriously delicious! The portions are super generous too! And it’s really cheap! If I get the chance next time, I’m definitely ordering it again! It’s seriously so good!)

Day 4
Pretty good luck—I played codeforces and solved a relatively simple D1, which was the kind of mex problem I like, and successfully reached purple at 1959, fulfilling a long-cherished wish of over 500 days! Actually, during that cf round on Day -1, I already had a strong premonition that I would reach purple very soon, as if this premonition were forcefully pushing my rating up, refusing to let me say no. But why didn’t this premonition help me perform well at the regional contest?
I feel like it was precisely this slightly carefree, slacking-off mindset after failing to secure a silver medal that actually made me perform better.

2025/11/18 19:35:13