Monday, May 16, 2005

I'm blue!

Lest my readers think that I have finally slipped over the edge and have begun to take masochistic pleasure in my own melancholia - the 'blue' in the title does not refer to my mood. Saturday night was my 3rd TopCoder match, and I've finally made the jump to division 1! For the uninitiated, this means I'm now officially a blue coder, as opposed to my division 2 green color....

Downsides:
  1. I'm not that good at algorithms yet - I'll need a couple of weeks of intensive work before I can truly call myself blue(and someday yellow...and who knows, one day I might even reach red!).
  2. Time is something I won't have for about 3-4 weeks - what with studying for exams right now, and the actual exams at the end of the month - I've got my hands full.
  3. This means I'll end up being bounced back to division 2, where I can handle things....eventually I'll go blue again, and then green, and then blue...until I can give it the time it needs and go blue permanently.
Of course, I won't be competing in SRM's during the exams, so my rating will remain constant during that period. Still, there's an SRM coming up on Wednesday morning - not sure I can resist the temptation...

Oh yes, almost forgot to blow my own trumpet about the last match - I managed to give it my best performance yet, coming in second in my room(damn that C# coder!) and 37th in division 2. That's 37th out of about 550 people, so I'm pretty happy about that...Currently ranked 897 among all of TopCoder's rated members...

Noticed a weird thing though - there was not a single successful challenge in the entire room. The reason was pretty obvious though...the 250 was too simple, and the 500, while not difficult, was complex to code, making challengers a little wary of risking their own points on code they didn't understand. System tests still claimed quite a few though...surprisingly one chap even lost his 250. I'm amazed that no one caught it and challenged...

On a related but slightly different track, I sent in a solution to this Sunday's Mindsport endgame. For those who don't know, Mindsport is this weekly puzzle column in the Times of India. The final problem is called the endgame, and is supposed to be difficult...

Anyway - I opened up the paper this Sunday, and took a look at this week's endgame, and was mildly astonished to see that the endgame was a truly pathetic problem that barely deserved five minutes of thought. Since I wanted a little fun, I wrote a little code to simulate the conditions of the problem. TopCoder hardened mental muscles parsed the question as a simple O(1) algorithm(For non CS people, this boils down to him wanting a fancy formula to solve it in one go. Not exactly the textbook definition of O(1), but definitely worth inclusion in that class...)

Two minutes and a pageful of scribbles later, I had the formula needed, and proceeded to write a little code to test it out with random inputs(comparing with the simulation). It worked like a charm. The formula itself was so simple that I could scarcely believe it was correct - only testing convinced me otherwise. Interested parties, contact me for the solution...

Time now to study Computer Graphics - thankfully my hugely exercised coding and problem solving skills(yes, modesty is a terrible crime...) will have some use there...

No comments: