【POJ 2234】Matches Game

题目传送门:http://poj.org/problem?id=2234

卧槽,真™有板题QAQ
证明可以看这里:https://maxmute.com/

#include<iostream>
#include<cstdio>
using namespace std;

inline int read(){
	char c=getchar(); int ret=0;
	while (c<'0'||c>'9') c=getchar();
	while (c<='9'&&c>='0') ret=ret*10+c-'0',c=getchar();
	return ret;
}

int main(){
	int n; while (~scanf("%d",&n)) {
		int vout = read();
		for (int i=1;i<n;i++) vout ^= read(); 
		if (!vout) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
} 

One thought to “【POJ 2234】Matches Game”

Leave a Reply

Your email address will not be published. Required fields are marked *