Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long 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;
}
}
}
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:29:25
- Judged At
- 2024-11-11 02:46:07
- Judged By
- Score
- 1
- Total Time
- 30ms
- Peak Memory
- 568.0 KiB