http://acm.hdu.edu.cn/showproblem.php?pid=1850

#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>

using namespace std;
int a[105];
int main()
{
    int n;
    while(cin>>n)
    {
        if(n==0)
        break;
        int sum=0;
        for(int i=1;i<=n;++i)
        {
            cin>>a[i];
            sum=sum^a[i];
        }
        int ans=0;
        for(int i=1;i<=n;++i)
        {
            if(a[i]>(sum^a[i]))
            ++ans;
        }
        cout<<ans<<endl;
    }
    return 0;
}

posted on 2012-05-11 10:09  夜->  阅读(142)  评论(0编辑  收藏  举报