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

POJ 2234 Matches Game(取火柴博弈1)

时间:2016-03-02 00:07:46      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

传送门

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

int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        int a,res=0;
        for(int i=0;i<n;i++)
        {
            scanf("%d",&a);
            res^=a;
        }
        if(!res)//T
            printf("No\n");
        else printf("Yes\n");
    }
    return 0;
}

POJ 2234 Matches Game(取火柴博弈1)

标签:

原文地址:http://www.cnblogs.com/atmacmer/p/5233281.html

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