/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 4ms 480.0 KiB
#3 Wrong Answer 2ms 512.0 KiB

Code

//Muhimin
#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int n, k;
    cin >> n >> k;

    int cnt1 = 0;
    for(int i = 1; i <= n; i++){
    	int x;	cin >> x;
    	if ( x == 1 ) cnt1++;
    }

    if ( (cnt1 & 1) and (k & 1) ) {
    	if ( n & 1) cout << "Kamona" << '\n';
    	else cout << "Hridoy" << '\n';
    }
    else {
    	if (n & 1) cout << "Hridoy" << '\n';
    	else cout << "Kamona" << '\n';
    }

}


int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int t = 1, tc = 0;
    cin >> t;

    while(t--){
    	//cout << "Case " << ++tc << ": ";
    	solve();
    } 
}


Information

Submit By
Type
Submission
Problem
P1118 Stone Duel
Contest
Sylhet ICPC 2024 Collaborative Challenge: Episode 2
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-30 12:40:44
Judged At
2024-11-11 02:34:34
Judged By
Score
10
Total Time
4ms
Peak Memory
532.0 KiB