Simply create a recursive or DP solution for the small case... print
out part of the table... and you notice a huge patttern. Basically the
actual solution is if b%2==0 then white else black. There were no
unknowns. (It may be the other way around, but I think if you code up
the creation of the table and look at it then it's quite obvious)

I'd be interested in knowing if anyone came about the solution more
directly...

On Sep 19, 2:44 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
>  Hi All of you
>  I would like to know the  algorithm used to solve the problem of the
> 'old magician'(Question no1) that was in the practice test held on
> saturday.I hope you may help me with this.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to