Alice and Bob are playing a game called Moving Chips. The game is played on an \(n \times m\) board where some cells has some chips on it. Two players move alternately. Each turn consists of one person moving a chip to any cell to its left or any cell to its top. For example, the possible movements of chip A on a \(3\times 5\) board is :
The last player who moves all the chips to the top left cell wins.
Consider the configuration below. Alice will move first. Assume that both players move optimally, who will win the game?
The chips can be stacked on top of each other.
The chips can move pass any chips.
Do you have a generalized strategy for this problem? Then you might enjoy the Large Data version!