Nimble Game

Nimble is played on a line of squares numbered 0, 1, 2, ..., n-1. Each square i contains coins[i] coins. A move consists of choosing a square with at least one coin and moving any positive number of coins to any lower-numbered square. Coins moved to square 0 are removed from play. The player who makes the last move wins. Determine if the first player has a winning strategy.

Each coin sits on a numbered square and may only move left, so the sum of all square indices strictly decreases and the game must end. Moving several coins off one square is equivalent to a single move in a Nim pile whose size is the square index, but the game has one important simplification.

Coins on even squares never affect the outcome, because a move from an even square can always be answered from the same square with the same number of coins. Only odd squares matter, and inside those only the parity of the coin count matters, since two coins on the same square cancel each other. XOR the indices of every square holding an odd number of coins. A non-zero result means the first player wins, and zero means the second player wins.

Examples
Input: [0,1,0,2]
Output: true
Hints

Nimble Game

Nimble is played on a line of squares numbered 0, 1, 2, ..., n-1. Each square `i` contains `coins[i]` coins. A move consists of choosing a square with at least one coin and moving any positive number of coins to any lower-numbered square. Coins moved to square 0 are removed from play. The player who makes the last move wins. Determine if the first player has a winning strategy.