HDU(1849)Rabbit and Grass(博弈)
来源:互联网 发布:淘宝店招设计素材 编辑:程序博客网 时间:2024/05/19 18:16
/* 尼姆博弈,并且SG(n) = n */#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>#include <math.h>#include <stdlib.h>#include <queue>#include <vector>using namespace std;int main (){ int n,m; while(scanf("%d",&n)&&n){ int ans = 0; for(int i = 0;i < n;i++){ scanf("%d",&m); ans ^= m; } if(ans) printf("Rabbit Win!\n"); else printf("Grass Win!\n"); } return 0;}
0 0
- hdu 1849Rabbit and Grass(博弈)
- HDU(1849)Rabbit and Grass(博弈)
- HDU 1849 Rabbit and Grass(nim博弈)
- HDU 1849 Rabbit and Grass 【Nim博弈】
- HDU-1849-Rabbit and Grass【Nim博弈】
- hdu 1849 Rabbit and Grass Nim博弈
- [HDU](1849)Rabbit and Grass ---Nim博弈(博弈)
- hdu 1849 Rabbit and Grass(尼姆博弈)
- hdu 1849 Rabbit and Grass SG定理(简单博弈)
- HDU 1849 Rabbit and Grass【尼姆博弈】
- hdu 1849 Rabbit and Grass(nim 博弈)
- HDU 1849 Rabbit and Grass 博弈Nim游戏
- HDU 1849-Rabbit and Grass(尼姆博弈)
- HDU 1849 Rabbit and Grass(尼姆博弈)
- HDU 1849 Rabbit and Grass(博弈入门)
- HDU 1849-Rabbit and Grass(尼姆博弈)
- hdu 1849 Rabbit and Grass(Nim博弈入门)
- hdu 1849 Rabbit and Grass(s-nim博弈)
- HDU(1851) A Simple Game (博弈)
- HDU(1850) Being a Good Boy in Spring Festival (博弈)
- Vizrt数据处理中的终极武器之SMM-Shared Memory Map
- HDU(1517)A Multiplication Game(博弈)
- php 常用正则表达式
- HDU(1849)Rabbit and Grass(博弈)
- Action层代码封装模板
- HDU(2188)悼念512汶川大地震遇难同胞——选拔志愿者
- FZU Problem 1534 阿甘的珠宝 (博弈)
- 程序的可移植性——字长/不透明数据/数据对齐/大小端
- HDU(1536)S-Nim (博弈)
- HDU(1867)A + B for you again (KMP)
- Codeforces Round #106 (Div. 2) 149/E E. Martian Strings
- HDU(4522) 湫湫系列故事——过年回家