Homepage: www.whit537.org           Email: chad@zetaweb.com

Wednesday, November 25, 2009

TopCoder debut at 1022

TopCoder is the major league of competition programming, and apparently it's also the best way to study for interviews with software companies. Today, after a week or two of practice, I competed in my first TopCoder event. I got my butt kicked.

The main event is the fortnightly Algorithm Single Round Match (SRM). About 1500 people, mostly students from China, India, and Russia, compete in chatrooms of 20 each. The competition entails a 75 minute "coding phase" where you solve three programming problems (easy: 250 points, medium: 500, hard: 1000), and then 15 minutes of trying to crash each others' programs ("challenge phase"). Lastly, everyones' programs are subjected to extensive "system tests". If you fail a challenge or system test, you lose all points for that problem. Points tick down once you open a problem, so speed-to-correct-program is the key.

I finished the easy problem in a barely respectable 10 minutes (for ~238 points), and started in on the medium problem. I sketched the algorithm properly on paper, but during implementation got bogged down in a) type conversions in C++, and b) edge cases. I ultimately failed to submit the medium problem within 65 minutes of opening it; I never opened the hard problem. For comparison, the fastest time for a correct answer to the medium problem was 4 minutes and 12 seconds. During the challenge phase, I challenged someone just to feel what it felt like (the failed challenge cost me 25 points, but what did I have to lose?). System tests ran about 20 minutes, and within another 10 minutes, the website had been updated to reflect the results of the match.

Every competitor has a rating, and there are two divisions. The ratings are basically given on a curve, though it's unclear to me how they relate to the problem point values. I expected a rating of 213 (238 - 25), but came out with a rating of 1022! This puts me within arms' reach of Division 1, which starts at 1200. The current top coder is rated 3766. He started 4 years ago at 1067, and was in the top tier (>2200) within 3 months.

I had a lot of fun competing in TopCoder. Moreover, I can definitely see that doing well here would involve my becoming a better programmer. The next SRM is on December 5. I can't wait!

blog comments powered by Disqus