Home » ICPC Kanpur 2021: Our first onsite ICPC regionals

ICPC Kanpur 2021: Our first onsite ICPC regionals

This was our first year conducting onsite ICPC regionals on CodeDrills. There were a lot of challenges like creating custom OS, platform changes, ICPC domains, balloon interface etc.

In the beginning, we were pretty excited and nervous at the same time about how it would go. First Indian regional to take place was ICPC Kanpur at Chhatrapati Shahu Ji Maharaj University, Kanpur. As we had limited time to prepare a customised OS, we were apprehensive if it would work as expected.

3 weeks before ICPC regionals

Before I start the story, I want to give a shout-out for the endless efforts of Aswin Ashok, without whom we couldn’t have achieved any of this!

We started with the ICPC World Finals OS image to try out! Our first experiment of running it on a VM succeeded, but we were very disappointed with that image. As it was a generic Linux image without any features. Hence we started looking for some existing resources to build a new image. And with some effort, Aswin found Keith’s GitHub repo — https://github.com/icpc-environment. Huge shoutout to Keith Johnson for maintaining for these years and improving it every year!

I sent an email to Keith asking for helping us and received a nice reply from him:

Hi Vichitr, Thanks for your interest and for reaching out! I’d love to help out as I really think contests could use a better way to run local competitions.

He joined our Slack and turned up to help us throughout the regionals.

With Keith’s help, Aswin prepared the OS image and we shared it with the Regionals in previous week of the Regionals to try out. But we didn’t receive any feedback and couldn’t test it as lab staff was unable to install it on the machines. Hence we planned to reach there few days before.

27th Sept 2022

Aswin and I had planned to reach there on 27th Sept! On the night of 26th Sept, we discovered that our Indigo flight to Lucknow got cancelled due to operational reasons, creating chaos as it was crucial to reach there early. Luckily, we found another Indigo flight around the same time, and we landed in Lucknow around 9:30 PM. The campus was around 2-3 hours from the airport, and we had food packed in the cab to go straight to the RCD’s cabin to try out the OS.

Reached the campus around 12:30 AM. Soon we met Dr Sandesh Gupta — the ICPC Kanpur Regional Contest Director. He greeted us with a big smile and soon we went into his cabin, and got assigned with the task to test the OS. Aswin had an already prepared Hard Disk with him. He tried plugging in the hard disk, but the machine was not even showing up. Then we prepared a new USB 3.0 pen drive. To our surprise that also was not detected by machine. Firstly, we tried turning off secure boot. Still no luck! Later we figured out, it was because of pen drives being newly purchased and unformatted. So we tried after formatting them and this time, system could detect them.

Finally the OS worked nicely on the first machine in RCD’s cabin we tried. Though he asked to format and install it again 2–3 times to be extra sure it works! It worked well with the pen drives.

28th Sept 2022

Next day we had to install it in all the machines in the labs. As soon as we entered in the lab and tried it on the first machine, nothing was working! Once the installation was over, we tried accessing the internet, and alas! Machines were not able to connect to internet. We checked if machines were able to get DHCP IPs assigned. And they were not! We had to run the dhcpclient command on all the machines to get the IPs assigned.

Once it was done, we thought all good! Suddenly power went and systems got turned off. The moment they were turned on again, all of them had lost assigned IPs. This was a big issue. We had no other choice than assigning them static IPs. After a long day, we could finish only 1 lab. 2 labs were yet to be setup! But we were confident that we would be able to pull it off.

29th Sept 2022

Next day, we thought of preparing a script to do all this as we had some control of sending updates to all machines remotely using Ansible. And we were able to finish it quick. Then there were few systems which were not synced with system times.

After all this, when we restarted all machines, none of them worked, we thought something wrong with our system only to figure out later that their network went down.

The team set up printers but encountered issues with one machine printing invalid access instead of the actual content. They tried different configurations and eventually found the correct one. However, another machine had the same issue due to a single quote in the team name. The team member Aswin removed the quote, and they were able to successfully set up the network printer in the first lab. They worked late to set it up in another lab, but the printer in the third lab wasn’t working and needed replacement.

30th Sept 2022 — ICPC Regionals Mock Round

We joined the lab around 10 AM in the morning! One of panel member — Anurag Singh also joined us on 30th Sept.They arranged for another printer in left out lab. And it took 1–2 hours to setup that lab!Kanpur lab technicians also fixed the internet issues. Along with arranging for power backup! We were all set for Mock Round at 4 PM IST!

But during the round, many teams were not able to submit, they were getting some error that user is not authenticated. This was quite suspicious in the first place! We tried best to resolve it but couldn’t find anything on our side! We also checked if the network was blocking our TCP port. But that was also not the case. We figured out that if users logged out and logged in, it worked hence we requested contestants to do so!

After the mock, we still had a crucial task: prepare the problem set PDF. But difficulties were pending statement verification. We spent many hours on statement reviews and could get the PDF by 10 PM. And sent it to Dr Sandesh Gupta (the ICPC Regionals contest director ) to print.

Also, the contest dinner was on this day! We enjoyed quite nice food there! Planned to prank contestants to discuss some of the hardest topics standing between them so that they think there is some problem based on those topics. 😛

I still had some tasks to review the problems as if we find something during contest, it messes up everything! So better to be extra sure before hand.

After the mock contest, many contestants requested for sublime text editor which was not installed on the machines. We initially declined the request but later tried to get it. With the ability to remotely modify the machines, we pushed a script and sublime text packages onto all machines before the contest day.

1st Oct 2022 — ICPC Regionals Contest Day

All set for the contest! I had to wake up early, around 7 AM, after just 3 hrs of sleep to scale up the servers for the main contest. I finished the scaling up in around 30 mins. Skipped breakfast and left for the contest arena to get some time to check if all systems were up. In the lab, restarted all labs to sync up the times and checked internet was working! And we got no surprise there! So the contest started at 10 AM as planned: https://codedrills.io/contests/icpc-kanpur-2021-regional-round

ICPC Regionals went quite nicely! Teams solved around 5 problems in the first hour itself. The problem set was looking on an easier side! It was going well until 1 PM. Only 2 problems were left to be solved by then. We thought the top team might finish it before 1 hour mark! So planned to be ready to freeze if they get any submission! But until around 1:45 PM, the top team had solved 9 problems, and hadn’t made any submission on last one! Ranklist froze at 2 PM for last one hour to keep the suspense on! Team rng(weed), Indian Institute of Technology — Varanasi solved all 10 problems at around 2:30 PM. And they shouted in the excitement in the arena and left the hall — and it was no surprise anymore that who is the winner! 🙂

After the contest, we asked for feedback from contestants, which was good all in all. Some teams had to keep doing logout-login again and again! Later only, we figured out we had missed a few of our domains to whitelist in our OS. The forgotten domain was used to refresh the auth token! And that is why many teams were getting an unauthorised error, and they had to log out & login back in to submit.

2 thoughts on “ICPC Kanpur 2021: Our first onsite ICPC regionals

Leave a Reply

Your email address will not be published. Required fields are marked *