#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int MAXM=;
int m,a[MAXM],sg[MAXM];
//对于所有的sg[x]状态先默认为0,即必败
//sg(x)=mex{sg(y)|y是x的后继}
//即sg(y)集合中,未出现的最小非负整数
//这里利用xor异或的特殊性质,将sg(x)=sg(y1)^...^sg(yk)
//sg(x)>0为必胜,sg(x)=0为必败
int main(){
while(scanf("%d",&m)!=EOF){
memset(sg,,sizeof(sg));
for(int i=;i<=m;i++)scanf("%d",&a[i]);
for(int i=;i<=m;i++)sg[i]=sg[i-]^a[i];
puts(sg[m]?"Yes":"No");
}
return ;
}

最新文章

  1. Microsoft Visual C++ Compiler for Python 2.7
  2. SQL中关于字符串的处理
  3. .NET中的视图和过滤器 (DefaultView和RowFilter)
  4. HDU 5387 Clock
  5. Java_Spring MVC_Servlet
  6. 10行Java代码实现最近被使用(LRU)缓存
  7. http协议与内容压缩
  8. MySQL索引原理与慢查询优化
  9. Dockerfile制作sshd镜像
  10. window.open和window.close的使用详解
  11. samba 开启
  12. 从花式swap引出的pointer aliasing问题
  13. YiShop_商城网站建设应该注意什么
  14. New UWP Community Toolkit
  15. Centos7下Redis3.2的安装配置与JReid测试
  16. centos6.5安装Mysql5.6及更改密码
  17. switch and checkbox
  18. HDOJ5547 SudoKu
  19. 149. Max Points on a Line同一条线上的最多点数
  20. 通用shellcode

热门文章

  1. LaTex安装介绍
  2. opencv —— HoughCircles 霍夫圆变换原理及圆检测
  3. 创建react项目,用typescript语法
  4. [TJOI2008] 小偷
  5. React网络请求跨域代理设置
  6. [CF1311E] Construct the Binary Tree - 构造
  7. SpringBoot学习- 11、更好用的代码生成工具EasyCode
  8. Windows下Anaconda安装、换源与更新
  9. JS实现粒子拖拽吸附特效-sunziren
  10. 作业day2