Alice and Bob play a game on a chessboard with R rows and C columns, so RC squares in total. Some of the squares are burned.
A king is placed on an unburned square, and Alice and Bob move it one step at a time, taking turns.
On a turn the player must move the king to one of the 8 squares next to its current square, subject to two conditions:
- the destination square must not be burned;
- the king must never have entered that square before. The starting square already counts as entered.
A player who cannot move the king on their turn loses. Alice moves first. Determine who wins when both players play optimally.