QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#394088 | #8549. The Game | SocialPanda | WA | 2ms | 7544kb | C++23 | 496b | 2024-04-20 00:02:05 | 2024-04-20 00:02:07 |
Judging History
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'