/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 540.0 KiB
#2 Wrong Answer 19ms 576.0 KiB
#3 Wrong Answer 9ms 580.0 KiB

Code

#include <bits/stdc++.h>
#define int long long
#define sqrt(x) sqrtl(x)
using namespace std;

namespace solve {
  namespace test_case {
    void main() {
      int n, odd (0), even (0); cin >> n;
      vector<int> v(n);
      for (auto &i : v) {
        cin >> i;
        if (i % 2 == 0) {
          even++;
        } else {
          odd++;
        }
      }
      if (odd == even) {
        cout << "Hridoy" << '\n';
      } else if (n & 1) {
        if (odd == 0 || even == 0) {
          cout << "Hridoy" << '\n';
        } else {
          cout << "Roy" << '\n';
        }
      } else {
        cout << "Hridoy" << '\n';
      }
    }
  }

  void main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t (1); cin >> t; 
    while (t--) {
      test_case::main();
    }
  }
}

signed main() { solve::main(); } 

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:30:49
Judged At
2024-12-17 11:34:38
Judged By
Score
1
Total Time
19ms
Peak Memory
580.0 KiB