AcWing 891. Nim游戏
作者:互联网
//a1 ^ a2 ^ ··· ^ an = 0 –>先手必败; //a1 ^ a2 ^ ··· ^ an != 0 –>先手必胜; #include<iostream> using namespace std; int main() { int n; cin >> n; int res = 0; while(n --) { int x; cin >> x; res ^= x; } if (res) puts("Yes"); else puts("No"); return 0; }
标签:891,puts,Nim,int,res,cin,a1,a2,AcWing 来源: https://www.cnblogs.com/QingyuYYYYY/p/11918940.html