Home » personal » Impressions from HC2 contest

Impressions from HC2 contest


hc2 pic

On Saturday, we participated on HC2 programming contest together with Karolos and Nikos. Our main motivation was the experience of the event and the opportunity to learn something more about designing and implementing algorithms. We knew that many people with years of experience in coding contests would be there (including people who have won medals in Olympiads in informatics or maths, past winners of the competition and other really smart people). Our goal was to land in the middle of the rankings, which we thought would be difficult.

During our trip to Lausanne, our discussions included discussions problems we had looked up and their algorithms, some implementation specific details on C++, a nice problem on distributed algorithms that Karolos had proposed for a course and some more personal details on our week. Arriving at Lausanne on Friday night, we headed towards the place where we would stay and prepare ourselves for the big day.

On Saturday, the day of the competition, we arrived at CO building at EPFL. There, we saw several people who were known for their great skills. We felt that we were way below the average. At least, we could enjoy the nice breakfast.

During the presentations from the sponsors, it was funny that one presentation of a company was supposed to be given by three people but instead only one made it due to physical illness of the other two. The audience clapped for him! After the technical presentation of how things are set up, we went for the dry-run, which is the testing phase of the competition and help us to get used to how things work.

There, we were given a task and when we solve it, we could proceed to the next one. During the competition each team has access to only one computer. Therefore, all of us tried to solve each task at the same time. We solved the first and the second one in two ways. For the third one, we were given a text that was not in English. We immediately understood that it is the classic trick of having shifted all of the character by a constant number. Most teams didn’t care enough for the dry run. Therefore, by the end of the second task submission we found ourselves leading the scoreboard. That was completely unexpected. Therefore, in the third task, we were in hurry to see if could maintain our lead. This is the reason that we didn’t submit the second solution for the second problem (we had already solved it). Moreover, and this is more funny, when we got the third task and because we were in hurry, Karolos who types in an amazing speed, was decided to start typing the third task on the computer so we could find the correct decoding of the text. Then, it came to us that we could have just copied from the pdf file (we are given the assignments both printed and in electronic form). Nevertheless, we made it in time and we finished first. We knew that this was a pure luck result since most teams didn’t care enough for that, but it boosted our self-confidence for the official round. This experience coupled with the free pizza during lunch made a very nice first part of the competition.

After the lunch break, the official competition started. When we entered the room, all the teams were already there. Somehow, we managed to be late (but not a lot). The problems were already there and we could start tackling them. The strategy we had agreed on was that for the first ten minutes, each one of us reads a different problem, sketches the solution on paper and then writes the code. Nikos was very very fast and he solved the first problem in about fifteen minutes (including code submission). Tackling the rest of the problems, Karolos managed to solve two problems in the row. In the meanwhile, I was stuck in deciphering the crypto problem. With some help from Nikos and Karolos, some very quick and dirty hacks in Python we deciphered the text and submitted the solution. Then, after Karolos explained me the problem on portals, we managed to find a solution using some elementary rules from physics. In the meantime, Nikos was trying really hard with the cyberfood problem. His effort was amazing. He mentioned a plethora of ideas. We discussed together some of them. We found two different solution but both of them were slow. Unfortunately, when we came up with our last solution the time had already run out so we didn’t have the chance to implement it. Later, looking at the solutions, we saw that our last solution was very close to the reference solution. Due to time constraints, we didn’t try hard enough the rest of the problems.

During the last hour, the scoreboard was not refreshed anymore. At that point point we were at 10th position. Unfortunately, during the last hour we didn’t manage to submit any solution so we were looking forward to learning how much our position would have dropped. Fortunately enough, we ended up being at the 15th position out of 40 teams. This is a very good result given that we were not very well prepared and much of our skills should be attributed to the excellent algorithms lab course that is taught at ETH. There, we learned how to abstract the description of problems and find the correct algorithm that leads to the solution.

At the end of the competition, we went out to take a group photo. Nikos and I were in T-shirts so we were freezing! Fortunately, winter is almost over and the weather conditions were good. After some more pizza and looking at the solution posters, we visited the impressive Rolex building at EPFL and tested our echoes while we were passing under the building. Returning to Lausanne (EPFL is not in the city) we realized how tired we were since we could barely speak coherently! After a nice burger though, we grabbed a beer in a nice place and met some friends from EPFL.

When we slept, we realized that this intensive effort had its toll on our bodies (very tired). Sunday was more quiet. We rested and then we studied a bit at the Rolex building. Taking the train back to Zurich, we recited our experiences and we had a nice conversation about several topics.

I think we were all happy with the experience of the contest and we wished we had more opportunities to participate in more competitions. If you ever find yourself thinking about a similar contest, don’t hesitate! It is a very nice experience and definitely you are not going to regret it!

See gallery of pictures.


1 Comment

  1. […] to last year, we participated in the coding contest […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: