Sunday - October 23, 2005
UW ACM Programming Competition
UW ACM held a programming competition yesterday, in teams of three. Young-Mi Shin asked me to join her and Jason Thorsness last Tuesday. I thought it would be fun, so I did. Here's a link to the competition page, with the problem sets and the scoreboard; I'm not sure how long that page will stay up. For those who don't want to bother following the link, here's how the competition worked:
- Java 1.5 or C/C++ only.
- Teams consist of 3 people.
- 1 Linux computer per team. No other computers allowed.
- 4 hours, 8 programming problems.
- You submit your solution online, and they tell you whether or not it passes or fails.
- The team with the most problems solved wins.
- If there is a tie, the team that took the least amount of time wins.
- Time taken per problem is calculated from the beginning of the competition. That is to say, if you took 10 minutes to solve the first problem, and 20 minutes after that to solve the second problem, your total time thus far would be 40 minutes.
- Each incorrect submission is a 20 minute penalty, but only if you actually eventually solve the problem.
- You can bring in and use any written material, but you can't look up things online with the exception of Java documentation and the standard C template library.
As it turned out, the competition was a blast. The problems are the sort I find fun to try to do, and there was free pizza and pop. I'm normally not a very competitive sort, but sometimes you feel like testing yourself to see how good you are. While the fact that we were in teams made it more difficult to gauge this, I can say that at least I didn't hold my team back.
There were 8 problems total. I was a little disappointed that we only managed to finish 3 problems, because it felt like we could have easily had 4 more. What ended up happening was that we seemed really close with only minor bugs for 2 of the solutions. I had 2 others written down on paper in pseudo-code, and Jason had another half-worked out. Sadly, we were "really close" for over an hour and a half and never got them working exactly right; it's always hard to tell how long debugging will take. And since there was only one computer to use, I never got to type out my code my two pseudo-coded solutions at all. Of course, it's quite possible that my logic was flawed and it would've ran into the same "almost there" syndrome, but it's fun to imagine the possibilities. Judging from the performance of the other teams, it seems likely that they ran into bug issues as well. As it was, I had already contributed by sumitting a correct solution for problem B, so I didn't feel like dead weight.
It was commented that this competition encourages bad coding practices. And indeed it does; you get points for nothing other than the correctness of the output and whether or not the program finishes in the alloted time limit. My solution for B was probably at least 4 times longer than it needed to be. Tactics include declaring that your methods throw Throwable, or writing tons of useful macros in the beginning of every problem. A previous competition problem involved printing out all the Mersenne primes below a certain number; the winning team's source code was just a series of print statements. I imagine the team had an inefficient way of finding the primes that didn't fit under the program execution time limit, so they just ran their program in the background and wrote down what it outputted while working on others.
I found it all hilarious. But anyway... the results of the competition.
A total of 11 teams competed. In first place was "Little Man Davis", with 7 out of 8 problems—the scoreboard shows 6 because they submitted the last one at the last second and no one bothered to update the scoreboard afterwards. Second place was "Minion", with 4 problems finished. Third place was "Team Megabyte" with 3 problems finished in the least amount of time. That was us! The top 3 teams get to go to regionals in Bellingham, so that's where I'll be November 5.
Yay for Team Megabyte! Good luck at regionals!