Wrong Answer
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-12-17 11:33:01
- Judged By
- Score
- 1
- Total Time
- 28ms
- Peak Memory
- 532.0 KiB