Approach for RANDGAME - COOK105A

Can anyone share their approach to the problem RANDGAME please!
I think the official editorials should be published by now.
Thanks!

Anyone else here who think that this questions title should be changed??

3 Likes

Person getting 1 can always win the game…
just find out who gets ‘1’ earlier…
suppose number is 101100 in binary then 1st one wins
if number is 1011000 then 2nd one wins…
strategy to win is just keep getting ‘1’ after you get ‘1’ (at LSB side) and also make sure that opponent gets \2 always ( means make a move such that opponent always gets even and you always get an odd number)…
it means for 101100 1st player will do

101100 \2

                10110 \2

1011 -1

                1010 \2

101 +1

                110 \2  

11 -1

                10 \2  

1 -1 win

3 Likes

Nope. That’s not the case.
People looking for the editorial of this problem will open this question expecting an editorial for problem because of the title - " Editorials for RANDGAME - COOK105A"

1 Like

I have changed the title.
Thanks

1 Like