OJ-Problems-Source/HDOJ/2509_autoAC.cpp
2016-08-22 00:30:27 +08:00

33 lines
573 B
C++

#include<iostream>
using namespace std;
int main()
{
int N,x,i,s,a;
while(cin>>N)
{
s=a=0;
for (i=0;i<N;i++)
{
cin>>x;
s^=x;
if(x>1)
a=1;
}
if(a==0)
{
if(N%2)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
else
{
if(s==0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
}
return 0;
}