nowcoder_Good Game, GG_思维

Good Game, GG

//
#include<bits/stdc++.h>
using namespace std;

typedef long long LL;        // 1e9 int 溢出

int main()
{
    LL t,n,x,cnt1,cnt2;

    cin>>t;
    while( t-- )
    {
        cnt1=cnt2=0;        // 不能tt, 因为分2 bob必输
        cin>>n;
        while( n-- )        // n<=1e5: O(n)
        {
            cin>>x;
            if( x&1 ) cnt1+=( x+1 )/2;
            else cnt2+=x/2-1; 
        }
        if( cnt1>cnt2 )     cout<<"Alice"<<endl;
        else                cout<<"Bob"<<endl;
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_63173957/article/details/124850643