POJ2234 xingxing在努力 博弈论 NIM
NIM博弈, 具体证明敬请期待。。。。。
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main() { int n; while(scanf("%d", &n) == 1) { int ans; scanf("%d", &ans); n--; while(n--) { int t; scanf("%d", &t); ans ^= t; } if(ans) printf("Yes\n"); else printf("No\n"); } return 0; }

浙公网安备 33010602011771号