Game of Lands

Limits: 500ms, 256 MB

Two big houses, The Lanisters and the Starks are fighting over the 7 kingdoms having infinite lands. To stop the war and to bring peace Danny came up with a solution. She will denote each land with a positive integer number. Then the Lannisters will make 1 move and take odd number of lands starting from 1. Then the Starks will start after 1, make two moves and take two even numbered lands, which are 2 and 4 respectively. Then the Lannisters will make 3 moves and take three odd numbered lands after 4, that are 5,7,9. And so on. One can take only one land in a single move. Also one land can only be taken once.


This is a companion discussion topic for the original entry at https://toph.co/p/game-of-lands