/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 536.0 KiB
#2 Accepted 16ms 552.0 KiB
#3 Accepted 4ms 500.0 KiB
#4 Wrong Answer 475ms 556.0 KiB
#5 Wrong Answer 479ms 548.0 KiB

Code

#include<bits/stdc++.h>
#define FileIO          freopen("input.in", "r", stdin); freopen("output.in", "w", stdout)
#define ll              long long
#define input_vec(v)    for(int II=0; II<v.size(); II++) cin >> v[II];
#define sortf(v)        sort(v.begin(), v.end());
#define sortr(v)        sort(v.rbegin(), v.rend());
#define print_vec(v)    for(int II=0; II<v.size(); II++){cout << v[II];} cout << endl;

using namespace std;

void test_case(ll tc)
{
    ll n, k;
    cin>>n>>k;
    vector <ll> v(n);
    for(auto &i: v) cin>>i;
    ll ans=0;
    for(ll i=0;i<n;i++){
        ans=ans^(v[i]%(k+1));
    }
    if(ans){
        cout<<"Hridoy"<<endl;
    }
    else cout<<"Kamona"<<endl;
}

int main()
{
    
    //if(fopen("input.in", "r")) FileIO;
    ll n; cin >> n;

    for(ll i=0; i<n; i++) test_case(i+1);
}

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:02:52
Judged At
2024-10-30 12:02:52
Judged By
Score
40
Total Time
479ms
Peak Memory
556.0 KiB