HDU 1851 - A Simple Game
来源:互联网 发布:windows apache php7 编辑:程序博客网 时间:2024/05/22 12:03
巴什博奕和Nimm博弈的组合版。
代码如下:
#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){#ifdef test freopen("input.txt", "r", stdin);#endif int c, n, m, num; scanf("%d", &c); while(c--) { int ans = 0; scanf("%d", &num); for(int i=0; i<num; ++i) { scanf("%d%d", &n, &m); ans ^= n%(m+1); } if(ans > 0) printf("No\n"); else printf("Yes\n"); } return 0;}
- HDU 1851 - A Simple Game
- hdu 1851 A Simple Game
- hdu 1851 A Simple Game
- hdu A Simple Game(1851)
- HDU 1851 A Simple Game
- hdu 1851 A Simple Game
- HDU-1851-A Simple Game
- hdu 1851 A Simple Game SG定理
- HDU(1851) A Simple Game (博弈)
- hdu A Simple Stone Game
- hdu 1851 A Simple Game Java 水题系列 博弈
- hdu 1851 A Simple Game (Nim博弈)
- hdu 2486 A simple stone game
- 【hdu 2486】A simple stone game
- HDU 6237 A Simple Stone Game
- HDU 1848 Fibonacci again and again && HDU 1851 A Simple Game (基础sg函数)
- A Simple FPS Game
- UESTC1141 A Simple Game
- java------关键字使用
- nodejs json格式转换
- Struts2文件类型规则列表
- ORACLE X$表命名约定
- enum类型的本质
- HDU 1851 - A Simple Game
- UML 的九种模型图
- hdu-1115
- hdu-4006
- hdu-1229
- hdu-1720
- zoj-1095
- uva-10055
- Bean装配 注入参数 详解