# Being a Good Boy in Spring Festival

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 6828    Accepted Submission(s): 4138

Problem Description

——“先手的人如果想赢，第一步有几种选择呢？”

Input

Output

Sample Input
3
5 7 9
0

Sample Output
1

My Code$My \ Code：$

/**
2016 - 08 - 31 下午
Author: ITAK

Motto:

**/

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
const int INF = 1e9+5;
const int MAXN = 1e3+5;
const int MOD = 1e9+7;
const double eps = 1e-7;
const double PI = acos(-1);
using namespace std;
LL Scan_LL()///输入外挂
{
LL res=0,ch,flag=0;
if((ch=getchar())=='-')
flag=1;
else if(ch>='0'&&ch<='9')
res=ch-'0';
while((ch=getchar())>='0'&&ch<='9')
res=res*10+ch-'0';
return flag?-res:res;
}
int Scan_Int()///输入外挂
{
int res=0,ch,flag=0;
if((ch=getchar())=='-')
flag=1;
else if(ch>='0'&&ch<='9')
res=ch-'0';
while((ch=getchar())>='0'&&ch<='9')
res=res*10+ch-'0';
return flag?-res:res;
}
void Out(LL a)///输出外挂
{
if(a>9)
Out(a/10);
putchar(a%10+'0');
}
int a[MAXN];
int main()
{
int n;
while(cin>>n,n)
{
int ans = 0;
for(int i=0; i<n; i++)
{
a[i] = Scan_Int();
ans ^= a[i];
}
if(ans)
{
int sum = 0;
for(int i=0; i<n; i++)
if(a[i] >= (ans^a[i]))
sum++;
cout<<sum<<endl;
}
else
puts("0");
}
return 0;
}


09-06 2364

12-27 351

04-09 1075

02-14 52

03-08 205

08-05 147

04-19 7

05-05 19

09-04 781

06-06 13