Wow. This was an amazingly interesting problem. I spent the whole
time on this one -- didn't even read the other 2 (partly since I
thought A was almost worthless point-wise because of the codejam snafu
and B looked hard). I *knew* it had to do with Fibonacci numbers, but
it never occurred to me to use any non-integers. There is a great
geometric explanation in the solutions. Now I understand the golden
ratio as the cosmic balance between fat and thin -- very Aristotelian!
Also, just learning the trick,
with k := floor(A/B)
{A-kB,B} winning =>
{A-(k-1)B,B} losing =>
{A-(k-2)B,B} winning =>
etc.
was worth all the time I spent on this contest. Thanks.
I would have gotten credit for C-small were it not for my debug-
printfs and procrastination, but I don't think I can ever code half as
fast as these competitors. If I can come up with one of these tricks
(aka insights), maybe I can make it to Round 2.
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.