/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 13ms 580.0 KiB
#3 Wrong Answer 6ms 576.0 KiB

Code

#include<bits/stdc++.h>
#define ll long long
#define endl '\n'

using namespace std;

int32_t main() {
    ios_base :: sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;

        vector<int> a(n);
        int even = 0, odd = 0;
        for (auto &k : a) {
            cin >> k;
            if (k & 1 ) odd++;
            else even++;
        }

        if (even == odd) cout << "Hridoy" << endl;
        else if ( (even == 0 || odd == 0) && n != 1 )cout << "Hridoy" << endl;
        else cout << "Roy" << endl;
    }

    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:55:21
Judged At
2024-12-17 11:35:43
Judged By
Score
1
Total Time
13ms
Peak Memory
580.0 KiB