题意:Nimm Game
思路:Nimm Game
#include<iostream>
#include<stdio.h>
using namespace std; int main(){
int m,a[],i,sum,ans;
while(~scanf("%d",&m)&&m){
sum=;
for(i=;i<m;++i){
scanf("%d",&a[i]);
sum^=a[i];
}
if(sum){
ans=;
for(i=;i<m;++i)
if((sum^a[i])<a[i])++ans;//优先级
printf("%d\n",ans);
}
else printf("0\n");
}
return ;
}