/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 26ms 532.0 KiB
#3 Wrong Answer 7ms 532.0 KiB
#4 Wrong Answer 5ms 324.0 KiB
#5 Wrong Answer 17ms 532.0 KiB
#6 Wrong Answer 17ms 532.0 KiB

Code

#include <bits/stdc++.h>
#define ll long long
int const p = 1e9+7;
#define pb push_back



//Check
// bool isPrime(ll n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(int i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
// bool isPowerOfTwo(ll n){if(n==0)return false;return (ceil(log2(n)) == floor(log2(n)));}
// bool isPerfectSquare(ll x){if (x >= 0) {ll sr = sqrt(x);return (sr * sr == x);}return false;}
// int exponentMod(int A, int B, int C) 
// { 
//     if (A == 0) return 0; 
//     if (B == 0) return 1; 
//     long long y; 
//     if(B % 2 == 0){ 
//         y = exponentMod(A, B / 2, C); 
//         y = (y * y) % C; 
//     }else { 
//         y = A % C; 
//         y = (y * exponentMod(A, B - 1, C) % C) % C; 
//     } 
//     return (int)((y + C) % C); 
// } 
 
using namespace std;

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int t; cin >> t;
    while(t--){
        int n; cin >> n;
        int even_no = 0, odd_no = 0;
        for(int i = 0; i<n; ++i){
            int x; cin >> x;
            if(x%2==0) even_no++;
            else odd_no++;
       }
        int mn = min(even_no,odd_no);
        int mx = max(even_no,odd_no);
        if (odd_no >= even_no) {
            cout << "Roy" << endl;
        } else {
            cout << "Hridoy" << endl;
        }
    }
}

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:28:58
Judged At
2024-10-03 16:28:58
Judged By
Score
1
Total Time
26ms
Peak Memory
532.0 KiB