1. 程式人生 > >poj 2234 Matches Game

poj 2234 Matches Game

name target stream using namespace fine int ostream define

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; }

poj 2234 Matches Game