Alice and Bob Playing Flower Game (LeetCode)
Compute the number of possible pairs (x, y) of flowers that satisfy the game conditions for Alice and Bob.
Compute the number of possible pairs (x, y) of flowers that satisfy the game conditions for Alice and Bob.
Alice and Bob take turns erasing one number from the chalkboard. If removing a number makes the bitwise XOR of all remaining numbers become 0, the player who made that move loses. If at any player's turn, the XOR of all numbers on the chalkboard is already 0, that player wins. Alice starts first, and both play optimally to avoid losing.
This is a solution to the Grid Game problem where two robots play optimally on a 2D grid.
This is a solution to the problem of determining the number of matchsticks the first player should pick to guarantee a win in the matchsticks game.
This is a solution to the Stone Game III problem on LeetCode.
This is a solution to the Subtree Removal Game with Fibonacci Tree problem on LeetCode.