POJ - 2234 Matches Game

https://vjudge.net/problem/POJ-2234

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    
    
	ios::sync_with_stdio(false);
	int n;
	while(cin>>n)
	{
    
    
		int res=0;
		int x;
		for(int i=0;i<n;i++)
		{
    
    
			cin>>x;
			res^=x;
		}
		if(res==0)
			cout<<"No\n";
		else
			cout<<"Yes\n";
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_52341477/article/details/120104572