/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Wrong Answer 12ms 584.0 KiB
#3 Wrong Answer 6ms 400.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int MODD = 998244353;

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//
//template <typename num_t>
//using ordered_set = tree<num_t, null_type, less<num_t>, rb_tree_tag, tree_order_statistics_node_update>;



void solve(){
    int n;
    cin>>n;

    int o=0,e=0;

    for(int i=1;i<=n;i++){
            int x;
            cin>>x;
            if(x%2)o++;
            else e++;
    }

    if(n==1){
        cout<<"Roy\n";
        return;
    }

    if(o==e or (o==0 or e==0)){
        cout<<"Hridoy\n";
    }
    else{
        cout<<"Roy\n";
    }
}

int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);


    int t = 1;
    cin >> t;
    //int T = 0;
    while (t--)
    {
        //T++;
        //cout<<"Case "<<T<<": ";
        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 16:56:49
Judged At
2024-11-11 02:47:15
Judged By
Score
1
Total Time
12ms
Peak Memory
584.0 KiB