poj 2234 Matches Game

Matches Game

 POJ - 2234 

nim游戏

#include<iostream>
#include<cstdio>
#define maxn 21
using namespace std;
int n;
int main(){
    while(scanf("%d",&n)!=EOF){
        int x,t=0;
        for(int i=1;i<=n;i++){
            scanf("%d",&x);
            t^=x;
        }
        if(t)puts("Yes");
        else puts("No");
    }
    return 0;
} 
原文地址:https://www.cnblogs.com/thmyl/p/8134894.html