Description
Input
Output
Sample Input
2 45 45 3 3 6 9
Sample Output
No Yes
解題思路:
尼姆博弈模板題。
AC代碼:
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int m, ans, a;
while(scanf("%d", &m) != EOF)
{
ans = 0;
for(int i = 0; i < m; i++)
{
scanf("%d", &a);
ans ^= a;
}
if(ans)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}