/ SeriousOJ /

Record Detail

Wrong Answer


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

Code

#ifndef LOCAL
#include <bits/stdc++.h>
#define debug(...)
#endif

using namespace std;
#define int long long
#define cinv(v) for (auto &it:v) cin>>it;
#define coutv(v) for (auto &it:v) cout<< it<<' '; cout<<'\n';

void shelby() {
    int n;
    cin >> n;
    vector<int> v(2);
    for (int i = 1; i <= n; ++i) {
        int x;
        cin >> x;
        v[x % 2]++;
    }
    sort(v.begin(), v.end());
    debug(v);
    if (v.front() == 1 && v.back() != 1) cout << "Roy\n";
    else cout << "Hridoy\n";
}

signed main() {
    cin.tie(0)->sync_with_stdio(0);
    int t = 1;
    cin >> t;
    for (int _ = 1; _ <= t; ++_) {
        // cout << "Case " << _ << ": ";
        shelby();
    }
}

Information

Submit By
Type
Submission
Problem
P1102 Odd-Even Game
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-04 13:48:41
Judged At
2024-11-11 02:42:51
Judged By
Score
1
Total Time
11ms
Peak Memory
576.0 KiB