poj 2234 尼姆博弈
来源:互联网 发布:男士整容知乎 编辑:程序博客网 时间:2024/05/18 12:05
题意:有n堆石子,每人每次可以从一堆中拿走任意多个,两人轮流操作,谁无子可取谁输。输入n堆石子各自的数量,输出先手是否能赢。
#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){//freopen("t.txt", "r", stdin);int n;while (scanf("%d", &n) != EOF) {int ans =0;for (int i =0; i < n; i++) {int a; scanf("%d", &a); ans = ans ^ a; }if (ans) printf("Yes\n");else printf("No\n"); }return 0;}
- poj 2234 尼姆博弈
- POJ 2234 Matches Game 尼姆博弈
- POJ 2234 Matches Game 尼姆博弈
- poj--2234--Matches Game(尼姆博弈)
- POJ--2234 Matches Game(尼姆博弈)
- POJ 2234 Matches Game(尼姆博弈)
- poj 2234Matches Game尼姆博弈模版题
- POJ-2234 Matches Game(尼姆博弈)
- POJ-2234-Matches Game(尼姆博弈)
- 转:poj 1704 阶梯尼姆博弈
- poj 2975 Nim 尼姆博弈
- poj 2234 博弈-Nim
- poj 2234基础Nim博弈||sg博弈
- poj 2234 Matches Game (博弈)
- [博弈]POJ 2234 Matches Game
- POJ 2234 Matches Game(博弈)
- poj 1704 阶梯尼姆博弈
- [POJ 1704] Georgia and Bob (尼姆博弈变形)
- drawable文件夹详解
- ffmpeg中available encoder
- Rockmongo 查询条件总结
- 八年
- swing中通过.class文件(把.java都删除)打包成jar文件,使用皮肤包遇到的问题。
- poj 2234 尼姆博弈
- ORACLE 中ROWNUM用法总结
- 解决 nf_conntrack: table full, dropping packet 的几种思路
- C# OleDb读取Excel异常:找不到可安装的ISAM
- linux 指令学习
- C++ 指针 (3)-算术运算
- APUE学习笔记第三章文件I/O
- SQL script 创建数据库
- java读写文件常用类