码迷,mamicode.com
首页 > 其他好文 > 详细

poj 2234 Matches Game

时间:2017-12-28 13:55:55      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:for   scan   nim   targe   tps   poj   http   ++   scanf   

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

标签:for   scan   nim   targe   tps   poj   http   ++   scanf   

原文地址:https://www.cnblogs.com/thmyl/p/8134894.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!