Game on Mars

Limits: 2s, 256 MB

In the year 2020, Alice and Bob will land on Mars just to play a game that will be broadcasted live for the humans on earth. The game is described below:


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

x, y <= 1e9 actually.