Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use dynamic programming to keep track of winning and losing states. Given some number of stones, Alice can win if she can force Bob onto a losing state.
Solve with full IDE support and test cases