/*
http://poj.org/problem?id=1740
*/
#include <iostream>
#include <cstdio>
#include <cstring>
#include <map>
#include <algorithm>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("in", "r", stdin);
#endif
int n;
RL:while(cin >>n, n){
map<int, int> m;
int a;
for(int i=0; i<n; i++){
cin >>a;
m[a]++;
}
if( (int)m.size()*2 <= n ){
bool flag = true;
for(map<int, int>::iterator it=m.begin(); it!=m.end(); it++)
if((*it).second%2 != 0){
flag = false;
break;
}
if(flag){
printf("0\n");
goto RL;
}
}
printf("1\n");
}
return 0;
}
博弈 POJ A New Stone Game
最新推荐文章于 2021-03-09 05:16:57 发布