Gym 101669J SEERC 2017 Cunning Friends

版权声明:博主很懒,转载注明出处就好=w= https://blog.csdn.net/Pure_W/article/details/83480366

手算了几个小数据猜结论冲了

#include<bits/stdc++.h>

inline void op(int x)
{
    puts(x?"Win":"Lose");
    exit(0);
}

int main()
{
    int n,a=0,b=0,c=0;
    scanf("%d",&n);
    for (int i=1,x;i<=n;i++)
    {
        scanf("%d",&x);
        if (x>2) c++;
        else if (x==2) b++;
        else a++;
    }
    if (c==1) c--,b++;
    if (c>1) op(0);
    if (b>2) op(0);
    if (b==1) op(1);
    op(a%3);
}

猜你喜欢

转载自blog.csdn.net/Pure_W/article/details/83480366