hdu 1849 (尼姆博弈)

http://acm.hdu.edu.cn/showproblem.php?

pid=1849
简单的尼姆博弈:
代码例如以下:

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int m,n,t;
    while(cin>>m,m)
    {
        int ans=0;
        for(int i=0; i<m; i++)
        {
            cin>>n;
            ans^=n;

        }
        if(ans==0)
            puts("Grass Win!");
        else
            puts("Rabbit Win!");
    }
    return 0;
}
原文地址:https://www.cnblogs.com/zfyouxi/p/5079475.html