/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 488.0 KiB
#2 Wrong Answer 29ms 584.0 KiB
#3 Wrong Answer 8ms 572.0 KiB

Code

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

typedef long long int ll;
#define max(a, b) (a < b ? b : a)
#define min(a, b) ((a > b) ? b : a)
#define TEXT freopen("azerah.in","r",stdin); freopen("azerah.out","w",stdout);
#define mod 1000000007
#define pii pair<int,int>
#define F first
#define S second
#define testcase int TT; cin >> TT; for (int tc = 1; tc <= TT; tc++)
#define POL(i,n) for (int i = 0 ; i < n ; ++i)
#define pb push_back
#define all(x) x.begin(),x.end()
//#define endl "\n"
typedef pair<int,int>PL;

//const long long N=1e6+7;
//vector<bool>pre(N,0);
//vector<ll>hp(N,0);
//vector<ll>v;
//ll f=0;
//vector<ll>mak(N,0);
//
//void precomp()
//{
//    pre[0]=pre[1]=false;
//
//    for(ll i=2; i<N; i++)
//    {
//        if(pre[i]==false)
//        {
//            v.pb(i);
//            f++;
//            hp[i]=i;
//            for(ll j=2*i; j<N; j+=i)
//            {
//                pre[j]=true;
//                hp[j]=i;
//            }
//        }
//    }
//
//    ll sum=1,j=1,val=1;
//    while(val<=N)
//    {
//        mak[val]=j;
//        j++;
//        sum*=2;
//        val+=sum;
//    }
//
//}

//ll binpow(ll a,ll b)
//{
//    ll ans=1;
//
//    while(b>0)
//    {
//        if(b&1)
//        {
//           ans=(ans*a);
//        }
//
//        a=(a*a);
//        b>>=1;
//    }
//    return ans;
//}

void solve()
{
    int n,odd=0,even=0,x;
    cin >> n;

    POL(i,n)
    {
        cin >> x;
        if(x%2)odd++;
        else even++;
    }
    if(n==1)cout << "Roy" << endl;
    else if(even==n || odd==n || even==odd)cout << "Hridoy" << endl;
    else cout << "Roy" << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    //TEXT;

    //precomp();


    testcase
    {
        solve();
    }


    return 0;
}

Information

Submit By
Type
Submission
Problem
P1102 Odd-Even Game
Contest
Brain Booster #6
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-03 15:47:28
Judged At
2024-12-17 11:36:04
Judged By
Score
1
Total Time
29ms
Peak Memory
584.0 KiB