/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 56ms 596.0 KiB
#3 Wrong Answer 19ms 320.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
int main()
{
    ll tc;
    cin>>tc;
    while(tc--)
    {
        ll n;
        cin>>n;
        vector<ll>v(n);
        map<ll,ll>mp;
        for(int i=0;i<n;i++){
            cin>>v[i];
            mp[v[i]%2]++;
        }
        if(n==1)
            cout<<"Roy\n";
        else if(mp[1]==0 || mp[0]==0 || mp[1]==mp[0])
            cout<<"Hridoy\n";
        else if(mp[0]+1==mp[1] || mp[1]+1==mp[0])
            cout<<"Roy\n";
        else
            cout<<"Hridoy\n";
        
    }
}

Information

Submit By
Type
Submission
Problem
P1102 Odd-Even Game
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-05 06:19:07
Judged At
2024-11-11 02:40:29
Judged By
Score
1
Total Time
56ms
Peak Memory
596.0 KiB