September 16, 2006
I'm out. It's over for me. Here's the list of advancers to Round 2.
I just can't seem to get past Round 1 of Google Code Jam. Nevertheless, this year's result was better from last year's Code Jam. In Round 1, there are three problems worth 250, 500, and 1000 points each (as opposed to the qualifiers with just two problems: 250 and 1000). In 2005, I was only able to submit a solution for the 250-pointer, and it didn't make it past the Challenge Phase. (See the rules for more info; it's a 15-minute round where you can challenge the solutions of other people and make them fail.)
This year, I was only able to submit for the 250-pointer as well, but it was a solution solid enough not to get challenged. I did make a mistake though in unsuccessfully attempting to challenge, which got me a 25 point reduction. Still, I was able to submit my solution fast enough (208.61 points) so I netted 183.61 points in all. It would've been enough to advance (the "passing" score was 174.60) but my solution failed the System Testing Phase.
Tip for Code Jam 2007 participants: All you need to pass the Qualifying Round and Round 1 is a quick and correct submission for the 250-pointer.
The 250-point problem was like this: given a fraction in the form of n/d (where d and n are integers and d is positive) and a positive integer maxDenom, find a fraction n2/d2 such that d2 is less than or equal to maxDenom, d2 is positive, and the absolute difference between n/d and n2/d2 is as small as possible. If there are candidate ties, take the one with smaller d2; if the numerators are equal, take the one with smaller n2. My solution seemed correct, but my waterloo was floating-point number precision. Given that I was using C#, I should've used the decimal data type insted of double.
I just needed to do a find and replace from "double" to "decimal"! Argh!!! (pounds head in frustration)
Well, that's that. What really sucks is that I have to wait another year for the next Code Jam. But hey, at least I've got a shirt from last year!
I just can't seem to get past Round 1 of Google Code Jam. Nevertheless, this year's result was better from last year's Code Jam. In Round 1, there are three problems worth 250, 500, and 1000 points each (as opposed to the qualifiers with just two problems: 250 and 1000). In 2005, I was only able to submit a solution for the 250-pointer, and it didn't make it past the Challenge Phase. (See the rules for more info; it's a 15-minute round where you can challenge the solutions of other people and make them fail.)
This year, I was only able to submit for the 250-pointer as well, but it was a solution solid enough not to get challenged. I did make a mistake though in unsuccessfully attempting to challenge, which got me a 25 point reduction. Still, I was able to submit my solution fast enough (208.61 points) so I netted 183.61 points in all. It would've been enough to advance (the "passing" score was 174.60) but my solution failed the System Testing Phase.
Tip for Code Jam 2007 participants: All you need to pass the Qualifying Round and Round 1 is a quick and correct submission for the 250-pointer.
The 250-point problem was like this: given a fraction in the form of n/d (where d and n are integers and d is positive) and a positive integer maxDenom, find a fraction n2/d2 such that d2 is less than or equal to maxDenom, d2 is positive, and the absolute difference between n/d and n2/d2 is as small as possible. If there are candidate ties, take the one with smaller d2; if the numerators are equal, take the one with smaller n2. My solution seemed correct, but my waterloo was floating-point number precision. Given that I was using C#, I should've used the decimal data type insted of double.
I just needed to do a find and replace from "double" to "decimal"! Argh!!! (pounds head in frustration)
Well, that's that. What really sucks is that I have to wait another year for the next Code Jam. But hey, at least I've got a shirt from last year!

0 Responses to “Google Code Jam 2006: The Round 1 wall”
Post a Comment