/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 316.0 KiB
#2 Wrong Answer 29ms 604.0 KiB
#3 Wrong Answer 8ms 552.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define fr for(int i=0;i<n;i++)
#define tc int t;  cin >> t;  while(t--)
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl

void solve()
{
    int n,od=0,ev =0;
    cin>>n;
    int a[n+10];

    fr cin>>a[i];

    fr{
        if(a[i]%2 == 0)ev++;
        else od++;
    }
    int z = od-ev ;
    if(z<0)z = z*(-1);

    if(od == ev or ev == n or od == n and z%2==0)cout<<"Hridoy"<<endl;

    else cout<<"Roy"<<endl;
}


int main()
{
    fastio
    tc
    {
        solve();
    }
}

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 16:43:09
Judged At
2024-11-11 02:47:45
Judged By
Score
1
Total Time
29ms
Peak Memory
604.0 KiB