解題說明
C++ 解法
複雜度分析
虛擬碼
1. Count stones by remainder mod 3: c0, c1, c2. 2. If c1 == 0 and c2 == 0, return false (Alice loses). 3. If c1 == 0, return c2 > 2 and c0 is even. 4. If c2 == 0, return c1 > 2 and c0 is even. 5. If c0 is even, return c1 != c2. 6. If c0 is odd, return |c1 - c2| > 2.