/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 11ms 816.0 KiB
#3 Wrong Answer 7ms 564.0 KiB
#4 Accepted 5ms 540.0 KiB
#5 Accepted 20ms 588.0 KiB
#6 Accepted 17ms 540.0 KiB

Code

/*
    1 2 3 4 5 6 7 8 9 10 11 
    5 6

    4 6
    3 6
    3 5
    3 4
    2 4
    1 4
    1 3
    1 3
    0 3

    4 6
    4 5
    4 4
    3 4
    2 4
    2 3
    2 2
    1 2
    0 2

    2 2 3 2 2 

    od = 1
    ev = 4

    1 4


*/

/* Solved by Sakhawat Hossain Mahin, CSE-28th, SMUCT */
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long

#define faf ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define test  \
    int T;    \
    cin >> T; \
    while (T--)

const int N = 1e5 + 7;
int ar[N];

void crack()
{
    int n;
    cin>>n;
    int od = 0, ev = 0; 
    for(int i = 0; i < n; i++){
        int x;
        cin>>x;
        if(x % 2){
            od++;
        }
        else ev++;
    }

    if((od < ev ? od : ev) % 2){
        cout << "Roy" << endl;
    }
    else cout << "Hridoy" << endl;

}

int32_t main()
{
    faf auto st = clock();
    test
    crack();
    cerr << 1.0 * (clock() - st) / CLOCKS_PER_SEC << endl;
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1102 Odd-Even Game
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-04 12:35:53
Judged At
2024-10-04 12:35:53
Judged By
Score
61
Total Time
20ms
Peak Memory
816.0 KiB