#include<iostream>
using namespace std;
const int maxn=100+5;
int N[maxn];
int main()
{
int m;
while(scanf("%d",&m)&&m)
{
int ans=0;
for(int i=0;i<m;i++) {scanf("%d",&N[i]);ans=ans^N[i];}
if(ans==0) printf("0\n");
else{
int count=0;
for(int i=0;i<m;i++)
{
if(N[i]>(ans^N[i])) count++;
}
cout<<count<<endl;
}
}
return 0;
}
HDU 1850 Being a Good Boy in Spring Festival(Nim game)
最新推荐文章于 2019-03-19 18:37:22 发布