标签:hdu1849 rabbit and grass 尼姆博弈
2 3 5 3 3 5 6 0
Rabbit Win! Grass Win!
#include <stdio.h> int main() { int m ; while(~scanf("%d",&m) && m) { int ans = 0 ; for(int i = 0 ; i < m ; ++i) { int t ; scanf("%d",&t) ; ans ^= t ; } if(ans == 0) { puts("Grass Win!"); } else { puts("Rabbit Win!"); } } return 0 ; }
hdu 1849 Rabbit and Grass 谁都喜欢刷水题。。尼姆博弈
标签:hdu1849 rabbit and grass 尼姆博弈
原文地址:http://blog.csdn.net/lionel_d/article/details/44133645