n堆珠子,每次选一堆至少取一个,然后可以选择是否把这堆剩下的分为任意的a,b两部分,谁先取完谁赢,问先手的是否能获胜。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <cmath>
#include <algorithm>
using namespace std;
int n;
int main()
{
int x;
int ans;
while(scanf("%d",&n)!=EOF)
{
ans=0;
for(int i=0;i<n;i++)
{
scanf("%d",&x);
ans^=x;
}
if(ans)
{
cout<<"Win"<<endl;
}
else
{
cout<<"Lose"<<endl;
}
}
return 0;
}