Today’s CCC

So today I wrote the Canadian Computing Competition today. I wrote the Junior division paper.

So this is a 3 hour programming contest, with 5 programming problems. A program reads input from the keyboard and outputs to the screen.

How this was set up was contestants were allowed to bring a USB with whatever we wanted on it. We used the school’s laptops. So I took Vim, Java, and some other stuff.

Vim really failed on me today. Randomly, my keyboard would switch to a French keyboard mapping or something (and wrong symbols appeared). Restarting Vim would correct this problem. Not knowing how to fix this, I had to restart Vim about 7-8 times. This was very frustrating under the contest situation.

I’m not going to type up the problems here, so if you haven’t written the CCC today, this blog post would make little sense. Well, until the problems are posted.

I think the problems themselves were pretty easy. This year problem 5 wasn’t particularly challenging. I finished all five questions in about an hour, and spent the next two hours doing completely unnecessary optimizations and the like. I scored 67 out of 75.

For the second problem, I had a spelling mistake (“Bryon” instead of “Byron”) and that cost me two points.

I somehow lost 6 points too for the fourth problem. I <think> it’s because I mishandled the one weird edge case where n=1, but I’m not really sure. I guess I’ll know when the test data comes out.

My solutions are available if anyone is interested.