This is my second ICPC regional and my first Seoul regional. Ironically, my first regional was the 2019 Bangkok Regional.
In 2018 I was a freshman, my Codeforces rating was blue, and most importantly, I hadn't even been doing competitive programming for a full year, so I just went with my adorable fellow freshmen to get a feel for ‘oh, so this is how contests work~’. Over the winter I did some hard training of my own on Codeforces and pushed my rating up to 2000, and this year I prepared with the goal of winning an award. So this was the first year I seriously prepared for ICPC, and I'd like to write down how I prepared, from the preliminary all the way to the regional.
Team practice
I had never done team practice before, so I asked my teammates how they'd done it in the past, but their memories seemed hazy. So I just ran things somehow myself.
Picking dates and places
I think we started team practice a bit late. After the semester started (in September at the earliest), we set dates and times so all three of us could make it. The place was either the club or a PC bang, and the time was 7:30 PM, twice a week.
학회실 못 써서 팀연습하러 PC방에 49시간 충전하는 흑우가 있다 pic.twitter.com/GvQQXkBDSM
— shift* 시프트 (@shiftpsh) September 16, 2019
At Sogang University, the four computer science lab rooms are each managed by a study club (ICPC Team, Release, CSPC Lab, CNU), and when there are no classes in a lab, CS students can use it freely. Opening the lab outside the department's official hours is up to the club, so it was a pretty nice setup: we could start practice at 7:30 PM, solve problems until 12:30 AM, read the editorial, and then go home. On days when the lab had classes, though, we had to practice at a PC bang, and besides the cost, using your brain in a noisy environment was a real ordeal. Well, couldn't be helped.
Picking a platform
At first we practiced by joining virtual contests on Codeforces Gym, and at some point we switched to using the practice feature of BOJ groups.

Codeforces Gym has a feature called Ghost. It reflects the submission history of the actual contest on the scoreboard, and I think the upside is that you can gauge where you would've ranked if you'd actually taken part in that contest. But early in our team practice, I only picked sets that were way too easy or way too hard, so it wasn't very meaningful, and so we moved to BOJ to avoid getting stressed out by the scoreboard + to train ourselves to spot the easy problems quickly.

The BOJ practice feature is really simple, so there's not much to explain. You set the practice time and register the problems in advance. Of course, the scoreboard only shows group members who participated during that time. When we couldn't find the easy problems, we'd pull up the final scoreboard on the contest's official site 1–2 hours into the contest. I don't think it was a great method.
Picking sets
Again, I knew nothing about ICPC regionals, so at first I literally picked whatever. Our first two team practices weren't ICPC regional sets. If I remember correctly, the first was an unofficial contest and the second was the KAIST RUN contest.
Every set I picked seemed to be either super easy or super hard, so I figured this wasn't going to work and looked up a bunch of posts online. After that, I relied a lot on the ICPC-style section of koosaga's How I practice problem solving, and mostly picked European regionals, especially NWERC. Subregionals were too easy, and regionals seemed to be the most appropriate difficulty. We also did sets recommended to us on the BOJ Slack.
We ended up doing about 13 sets in total before the contest. Personally, I do kind of regret not starting practice in the spring.
Building a strategy
Since it's not a solo contest, the more we practiced, the more I realized how important it is to schedule who solves which problem and when. Things like ‘this was definitely a problem we could solve, so why didn't we?’ happened a lot until about midway through our practice. The typical cases were
when the solution seemed right but kept getting WA
when I'd come up with a perfect solution, but another teammate spent all the time debugging so I couldn't even get it into code
.
The first case is most likely a simple mistake, so at onsite contests it's common to request a printout of your code and have another teammate work on a different problem. But I didn't know that, and on top of that you can't print at a PC bang… so taking advantage of the big PC bang monitors, another teammate worked on a different problem on the left side while I put my code up on the right side and debugged it by eye. I wish I'd known sooner that printing is available onsite.
The second case was a scheduling problem. For example, it's the case where ‘I've got solutions for E, F, and H!’ but someone keeps debugging J, and J creates a bottleneck for E, F, and H. So we prioritized writing solutions we were sure about over debugging wrong ones. And since only one person can use the computer, we tried to never leave the computer seat empty. With this strategy, the number of ‘problems we could've solved but didn't’ dropped a lot.
Learning from failure
Lastly, after each contest, we always read the editorial. We analyzed whether it was a technique we knew, and if we knew it, what we did wrong; if we didn't, we learned something new: oh, so this technique exists. Techniques we didn't know or ones we made lots of mistakes with went into the team notebook. Though as it turned out, we didn't really need the team notebook at the actual contest…
Solving the contest problems you couldn't solve after practice is called upsolvingupsolving, but by the time we'd read the whole editorial and discussed where we went wrong, it was well past 1 AM, and we had to come back to school during the day, so sadly that was too much. If circumstances allow, I'd really like to do upsolving too in future practice.
Preliminary
The preliminary was held at our school, in a homey atmosphere. In the club lab, no less. It's a place I'm always at, so I thought I'd be able to compete comfortably, but the server was in shambles, so I couldn't. Anyway.

In the preliminary, we solved 6 problems quickly.
I. Registration (3 min, shiftpsh): A problem that's been showing up consistently since 2013. You just print your ID and password. Right after the contest started I think I heard people all over going ‘hey, where's the registration one’, but the submission server was broken so it didn't matter. I thought it was just because everyone was submitting the registration problem, but…
B. Balanced String (14 min, semteo04): An easy problem where you compute . It was an easy problem, but the server was broken so we ended up submitting about 5 minutes later than when we actually solved it.
H. Four Squares (24 min, shiftpsh): I'd solved Lagrange's four-square theorem before, so I wrote it quickly.
C. Byte Coin (32 min, lvalue): It was an easy greedy, so it got written quickly. Again, the submission got delayed a few minutes because of the judging server.
L. Two Machines (73 min, semteo04): It was a knapsack DP. I knew it was knapsack, but the solution suddenly escaped me, so I declared that I couldn't write it.
D. Canal (117 min, shiftpsh): I was thinking about it, and semteo04 said it was binary search, so I trusted multiset and wrote it. Because of the contest server, we didn't get the judging result for this one until an hour or two after the contest ended, and after hearing another team say their multiset blew up, I was crushed and decided to calm my body and soul by watching the Yeouido fireworks.
— shift* 시프트 (@shiftpsh) October 5, 2019
Sogang University isn't that far from Seogang Bridge, so I walked from school to Seogang Bridge without thinking much and watched the fireworks alone. Right before I got to Seogang Bridge, the judging results were released, and I was relieved to find out D was accepted. Apparently we were 9th before the freeze.
It was such a shame that we couldn't solve J even though we knew it was the convex hull trick, and when I went to copy the code from the team notebook, the code in there was just the Commando solution. I brought an improved version to the regional afterwards, but there was no CHT at the regional. So mean
It was also a shame we didn't realize A was LR flow. But I think even if we'd written more code, the chance of getting more problems accepted was slim anyway with the server down.
Fast-forwarding…
The day before the regional
The regional is an onsite contest, and at onsite contests you get to meet lots of people you'd otherwise only see online, so the day before, I was busy chatting and sadly didn't get to practice.
Team Redshift @ Sogang U
— shift* 시프트 (@shiftpsh) November 8, 2019
+ Team Twitter Heavy Light Decomposition @ Hanyang U
+ Team JonMatTaeng @ POSTECH pic.twitter.com/mZgRwOXlHE
We had dinner the night before the contest with team Twitter HLD from Hanyang University and team JonMatTaeng from POSTECH. I don't remember the restaurant's name, but it was pretty good. Please open a branch near Sogang too.
Everything seems to be concentrated in the Yonsei/Ewha commercial area, so Sogang students have to go down toward Sinchon to eat or do anything, and here too almost everything is concentrated in the Konkuk University area, so I wondered if Sejong University students also have to go down toward Konkuk. If I'm right, Sogang and Sejong surprisingly have something in common. Though Sogang is a much smaller school…
??? pic.twitter.com/aM9qEjXeYQ
— shift* 시프트 (@shiftpsh) November 8, 2019
The contest was in the morning the next day, so we stayed at a nearby hotel. There was a concert I wanted to go to, but I couldn't sign up because of the contest schedule, and it turned out it was held in the building right next to our hotel. Why are you doing this to me
Regional
First thing after waking up, I did a lot of chocolate doping. It was Pepero Day season, so there was a 2+2 deal on Ferrero Rocher, and I should've stocked up…
One of my teammates didn't come to the hotel because of an exam they had to take on the day of the regional, studied at school instead, and overslept. Fortunately, the taxi driver transported(?) them at an admirable speed, so we avoided disqualification.

At the regional, we solved 7 problems. My personal goal was 7 problems and I was really happy we hit it. On top of that, we were the first to solve C and J.
J. Triangulation (11 min, shiftpsh, First to solve): A was a pretty easy problem, so lvalue came up with a solution right away and started implementing, but I was looking at J, drew a picture, and…
…it looked like it'd be way easier to implement than any other problem, so I cut in and submitted it. I came up with the idea quickly and luckily got the first solve. I was glad there were no server issues.
Right after solving J, we were 1st for a very brief moment. I took a screenshot, and after the contest I took a photo of the computer screen with my phone.
A. Fire on Field (13 min, lvalue): An easy problem where you just implement what it tells you to. When I cut in to write J, the code for A was almost done, so it got submitted right away and accepted.
L. What’s Mine is Mine (36 min, semteo04): A simple type of DP, so semteo04 solved it quickly.
I. Thread Knots (47 min, shiftpsh): Just looking at the picture, the problem smelled like binary search. I knocked it out right away.
B. Gene Tree (103 min, semteo04): We knew it was tree DP, but there were squares mixed in, so the formula came out monstrous. While I was busy expanding the formula, I said something like ‘what if we break it down and think of it like this?’, and semteo04 seemed to have an idea, implemented it hard, submitted, and got AC.
H. Strike Zone (164 min +2, semteo04): I figured mixing Kadane’s with a segment tree would work, so I wrote it first and submitted twice, but got WA. It turned out to be the exact same problem as Gold Mine from KOI 2014 middle school division. lvalue and I had no experience preparing for or competing in the Olympiad in Informatics so we didn't know, but semteo04, who did, threw out my code, rewrote it, and got it accepted in no time.
C. Islands (204 min +6, lvalue, First to solve): None of the remaining problems looked solvable, so lvalue took this one, and honestly nobody knows to this day why it got accepted. Whether the solution is actually correct or the data is just weak…
Problem K, Washer, seemed to deal with 3D, so I was writing code for 3D vector operations, and 15 minutes before the end of the contest I thought ‘what if we cut it with planes and brute-force in ?’ and implemented it that way, but kept getting WA. After the data was uploaded to BOJ, I implemented the same approach again and submitted it, and got AC, which was so frustrating. I probably implemented the cross product wrong or messed up the output format…
— shift* 시프트 (@shiftpsh) November 9, 2019
Our final placement was 15th in the team ranking and 8th in the school ranking. It's the first time in 4 years since 2015 (6th) that Sogang University placed in the single digits in the school ranking, so I was satisfied with the result. We also upheld the legend that teams named with a color plus a nickname win awards (BlueJoker in 2017, PurpleNoon in 2015).
Personally, I'm a bit disappointed since I didn't solve that many + never solved K in the end. Still, I made a lot of assists, so maybe it was okay ..?
It was a shame that the scoreboard was only revealed after the award ceremony. Did it really have to be this way… Still, the regional was run well overall (especially in that CLion was available!), and the snacks and dinner were delicious. Thank you.

I actually found out that overseas regionals have a registration fee because of the Bangkok contest, and it turns out Korea was the unusual one for not having one. Apparently there'll be a registration fee starting next year, and I'm fine with whatever the fee is, as long as problems like the preliminary server issues don't happen again.
I'm planning to take a leave of absence for a while, so I think the next one I'll take part in will be the 2022 or 2023 regional. Like our team name says, I'd love to actually make red and go to the World Finals at least once!
Great work, everyone. 🎈


























