iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🧑‍🧑‍🧒

ICPC2025 Domestic Preliminary Contest Participation Report

に公開

Introduction

I participated in the ICPC (International Collegiate Programming Contest) 2025 Domestic Qualifiers, and guess what!! We passed the domestic qualifiers!!!!


UEC25Atsumare is our team

I'm incredibly happy. We'll do our best at the Asia Regional (though it feels like we're going to get crushed by all the red-rated players...).

Team Introduction

We formed a team on Discord where nearly 90% of B1 students[1] from a server called "UEC25 Atsumare~!!" participate, hence the name UEC25Atsumare.

  • Myself:
    • B1.
    • Rubyist + Neovimmer.
    • Wrote in Python.
    • Highest rating: Cyan.
  • Kurage:
    • B1.
    • C++er... I think?
    • Wrote in C++.
    • Highest rating: Blue.
  • rein:
    • B1.
    • Rustacean.
    • Wrote in C++.
    • Highest rating: Green.

Before the Contest

Everyone, including myself, was busy, so we hardly did any special training for ICPC. At most, we did a single virtual contest with past problems.

As for me, I didn't even know the schedule—I found out "Wait, it's today!?" on Discord. It was a terrible state. I also barely understood the rules (I only knew the penalty was 20 minutes, there was one PC/keyboard, and only C++/Python/Kotlin were allowed).
I even had a misunderstanding (I thought the ranking was by score, with the tiebreaker being the submission time of the last solved problem plus penalties).

The Day of the Contest

For good luck, I ordered a cutlet curry for lunch on that day.

Since I didn't have a fourth period class, I went to the venue early and set up the environment.

  • Set up my customized Neovim configuration
  • Installed oj, oj-bundle, and expander-py
  • Downloaded ac-library and ac-library-python
  • Downloaded cpprefjp and Python Official Docs
  • Installed Ruby (for testing)
  • Confirmed login to the contest site
    • For some reason, http:// was still active, and I almost tried to access it...
  • Brought my own keyboard (the venue's keyboard was an HHKB Lite 2, so I brought a regular membrane keyboard from home)
  • Created directories

Then, Kurage-san arrived after finishing his experiment (around 16:10) and set up a minimal VSCode environment.

Then, at 16:30, the contest began.

Problem A (0:03)

I implemented it. Just do as the problem statement says.
I was flustered and almost submitted a + b... (I tested it properly with oj, so no issues)

Problem B (0:08)

I implemented it.
Set range(N + 1, N * 2 + 1) as the length (L), construct the string with S[i] or S[i - L], then check with startswith and endswith. The part with S[i - L] got confusing in my head, making it a bit slow...

Problem C (0:17)

Kurage-san implemented it. Meanwhile, I was thinking about Problem D.
There was a logic error, and the calculations didn't match, causing a delay.

Around this time, rein-san arrived.

Problem D (1:04)

I implemented it. Meanwhile, Kurage-san and rein-san were thinking about Problem E.

  • Apply run-length encoding vertically and horizontally.
    • (Actually, the run-length encoding code had a bug. And yet it passed somehow...)
  • The side length (if determined) is max(map(lambda c: c.length, vertically_compressed), map(lambda c: c.length, horizontally_compressed)).
  • If both compressed results fit within 2 elements, treat it specially. This is always valid, but the side length is undetermined.
  • Then, check if the side length matches the candidates, except for the top/bottom edges (checked vertically) and left/right edges (checked horizontally).
  • (The actual code had many special-case shortcuts and separate calculations for vertical and horizontal, so it took a while to implement... I want to write it more cleanly.)

Problem E (2:21)

Kurage-san implemented it. Meanwhile, rein-san and I were thinking about Problem F.
When we finished thinking about F, we started writing code alternately (probably not ideal...).
Since we didn't have a Printer extension installed, we created an HTML file and printed it via the browser. Not good.

Problem F (2:28)

I implemented it. As mentioned, I was also debugging Problem E in parallel.
Meanwhile, Kurage-san and rein-san were thinking about Problems G/H.

  • The operation can be expressed in regex as: /b(a+)/ -> \1b, /a(b+)/ -> \1a.
  • The total count of a and b does not change, so if it does, it's immediately impossible.
  • After converting to the form /a+b+/, I realized that constructing from the back makes implementation easy.
  • Since I was a bit unsure, I also implemented the /b+a+/ pattern.
    • Thinking about it now, even a naive n * (n-1) check would have sufficed... so it was unnecessary.
  • To be safe, I wrote a check script in Ruby and tested it with oj judge-command.
    • If the check script takes less than 20 minutes to implement, it's worth it.

Problem G (Incomplete)

Rein-san was implementing it... but couldn't fix the bug in time before the contest ended.

After the Contest / Epilogue

"Good work~~ (applause)"
"Alright, let's check the ranking... Rank 47! And within the university... (after Ctrl+F and typing 'The university of El') Wait, first in the university!? We passed the qualifiers!!!!!"
(Other teams: "Seriously!?" "No way!")
That's how it felt.
We entered with no expectations, so passing was a huge surprise.
Later, a senior told us, "The Asia Regional is all in English, uses US keyboard layout, you can only bring paper libraries, and setup is almost impossible." I was devastated. What should I do? I can't code without my dear Neovim...

After that, I went home soaking in the rain and ate curry. There seemed to have been a person-train accident on the Keio Line, so that was also rough.

Thank you to my teammates Kurage-san and rein-san, and to Nafmo for agreeing to be our coach and supervisor!

脚注
  1. There are 712 users, B1 has 744 students, considering alt accounts it's about 85-90% ↩︎

GitHubで編集を提案

Discussion