题解 UVA10165 【Stone Game】
事实上这题就是一个经典的
假设有一个序列
下面是代码:
#include <bits/stdc++.h>
using namespace std;
int _res;
int _num;
void ParseInCore() {
for(int i = 1; i < _num + 1; i++) {
int opt;
cin >> opt;
_res ^= opt;
}
}
void WriteOut() {
puts(_res == 0 ? "No" : "Yes");
}
int main() {
while(cin >> _num && _num != 0) {
_res = 0;
ParseInCore();
WriteOut();
}
return 0;
}