The must-win state, when the first hand performs a certain operation, and the second hand is a must-defeat state, it is a must-win state for the first hand. That is, the first mover can go to a certain defeat state.
In the must-defeat state, no matter how the first player operates, when the second player is a must-win state, it is a must-defeat state for the first player. That is to say, you can't go to any one of the defeated states.
n piles of stones, each pile has a1 a2 a3 …an
The upper hand to win the state a1^a2^a3^a4...^an !=0so just get exclusive or not equal to 0, so that there is emulated FLAC XOR to zero
State losing the upper hand a1^a2^a3^a4...^an =0so have the upper hand XOR 0, no matter how can not let take flip XOR to zero
At the end of the operation, the number of stones in each pile is 0^0^0^…0=0
During operation, if a1⊕a2⊕…⊕an=x≠0. Then the player can definitely change the XOR result to 0 by taking away a certain pile of stones.
If a1⊕a2⊕…⊕an=0, then no matter how the player takes it, it will inevitably lead to the inability to XOR the backhand to 0