1 //Accepted 0MS 232K
2 #include <cstdio>
3 #include <cstring>
4 int ans;
5 int t;
6 int n;
7 void slove()
8 {
9 int x;
10 ans=0;
11 t=0;
12 for (int i=0;i<n;i++)
13 {
14 scanf("%d",&x);
15 ans=ans^x;
16 if (x>1) t++;
17 }
18 if ((ans==0 && t>=2) || (ans!=0 && t==0))
19 {
20 printf("No\n");
21 }
22 else
23 {
24 printf("Yes\n");
25 }
26 }
27 int main()
28 {
29 while (scanf("%d",&n)!=EOF)
30 {
31 slove();
32 }
33 return 0;
34 }
时间: 2024-12-26 07:37:47