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
");
19         else printf("No
"); 
20     }
21     return 0;
22 }
原文地址:https://www.cnblogs.com/fzl194/p/8762432.html