QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394088#8549. The GameSocialPandaWA 2ms7544kbC++23496b2024-04-20 00:02:052024-04-20 00:02:07

Judging History

你现在查看的是最新测评结果

  • [2024-04-20 00:02:07]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:7544kb
  • [2024-04-20 00:02:05]
  • 提交

answer

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

void solve()
{
    int mp[1000100];
    //memset(mp,0,sizeof mp);
    int n,cnt=0,cao;
    cin>>n;
    cao=(n*2-2)/2;
    for(int i=1,a;i<=2*n;i++)
    {
        cin>>a;
        if(mp[a]>=1 ) cnt++;
        mp[a]++;
    }
    if(cao<cnt) cout<<"Qingyu"<<endl;
    else cout<<"Kevin"<<endl;
}

int main()
{
    int tt=1;
    cin>>tt;
    while(tt--) solve();
}

/*
3
3
1 1 4 5 1 4
2
1 2 3 4
4
1 2 2 3 2 1 1 4

*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 7544kb

input:

3
3
1 1 4 5 1 4
2
1 2 3 4
4
1 2 2 3 2 1 1 4

output:

Qingyu
Qingyu
Qingyu

result:

wrong answer 2nd words differ - expected: 'Kevin', found: 'Qingyu'