POJ-2234 Matches Game---尼姆博奕裸题
题目链接:
https://vjudge.net/problem/POJ-2234
题目大意:
思路:
直接异或
1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cmath> 5 #include<algorithm> 6 using namespace std; 7 int T, n, m; 8 int main() 9 { 10 while(cin >> n) 11 { 12 int ans = 0; 13 while(n--) 14 { 15 cin >> m; 16 ans ^= m; 17 } 18 if(ans)printf("Yes\n"); 19 else printf("No\n"); 20 } 21 return 0; 22 }
越努力,越幸运