/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 27ms 580.0 KiB
#3 Wrong Answer 7ms 484.0 KiB
#4 Accepted 5ms 532.0 KiB
#5 Accepted 21ms 532.0 KiB
#6 Accepted 25ms 536.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t; cin >> t;
  while(t--){
    int n; cin >> n;
    int cnt1 = 0;
    int cnt2 = 0;
    for(int i = 0; i < n; i++){
      int x; cin >> x;
      if(x % 2) cnt1++;
      else cnt2++;
    }
    int temp = min(cnt1, cnt2);
    if(cnt1 == 0 || cnt2 == 0) cout << "Hridoy" << endl;
    else{
      if(temp % 2) cout << "Roy" << endl;
      else cout << "Hridoy" << 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 17:17:50
Judged At
2024-10-03 17:17:50
Judged By
Score
61
Total Time
27ms
Peak Memory
580.0 KiB