标签:
题目:
Description
Input
Output
Sample Input
Sample Output
1 #include<cstdio> 2 int main() 3 { 4 int n,a[100],ans,flag; 5 while(scanf("%d",&n)==1) 6 { 7 ans=0; 8 flag=1; 9 for(int i=0;i<n;i++) 10 { 11 scanf("%d",&a[i]); 12 if(a[i]!=1) flag=0; 13 ans^=a[i]; 14 } 15 if(flag) 16 { 17 if(n&1) 18 printf("No\n"); 19 else 20 printf("Yes\n"); 21 } 22 else 23 { 24 if(ans) 25 printf("Yes\n"); 26 else 27 printf("No\n"); 28 } 29 } 30 return 0; 31 }
标签:
原文地址:http://www.cnblogs.com/forwin/p/4890472.html