HDU 5011 NIM博弈

http://www.cnblogs.com/exponent/articles/2141477.html

http://acm.hust.edu.cn/vjudge/contest/122814#problem/E

#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cctype>
#include <vector>
#include <iterator>
#include <set>
#include <map>
#include <sstream>
using namespace std;

#define mem(a,b) memset(a,b,sizeof(a))
#define pf printf
#define sf scanf
#define spf sprintf
#define pb push_back
#define debug printf("!
")
#define MAXN 205
#define MAX(a,b) a>b?a:b
#define blank pf("
")
#define LL long long
#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())
#define pqueue priority_queue
#define INF 0x3f3f3f3f

int n,m;

int main()
{
    int i,j;
    while(~sf("%d",&n) && n)
    {
        int cnt = 0;
        for(i=0;i<n;i++)
        {
            sf("%d",&m);
            cnt^=m;
        }
        if(cnt) pf("Win
");
        else pf("Lose
");

    }
    return 0;
}
原文地址:https://www.cnblogs.com/qlky/p/5685555.html