QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#689461 | #8549. The Game | szy10010# | WA | 3ms | 5716kb | C++23 | 999b | 2024-10-30 17:11:21 | 2024-10-30 17:11:23 |
Judging History
answer
#include<iostream>
#include<map>
#include<cmath>
#include<string>
#include<vector>
#include<cstring>
#include<algorithm>
#include<unordered_map>
#define pb push_back
#define fi first
#define se second
#define int long long
#define all(x) (x).begin(),(x).end()
#define _for(i, a) for(int i = 0; i < (a); ++i)
#define _rep(i, a, b) for(int i = (a);i <= (b); ++i)
#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define u1 (u<<1)
#define u2 (u<<1|1)
//#define endl '\n'
using namespace std;
typedef pair<int,int> PII;
const int INF=0x3f3f3f3f;
const int P=1e9+7;
const int N=2e6+20,M=2*N;
int n,m,k,q[N],cun[N];
void solve(){
cin>>n;
int sum=0,cnt=0;
_rep(i,1,2*n)cun[i]=0;
_rep(i,1,2*n)
{
cin>>q[i];
cun[q[i]]++;
}
_rep(i,1,2*n)
{
if(cun[q[i]]==1)cnt++;
else sum+=cun[q[i]];
}
if(cnt>=sum)cout<<"Kevin\n";
else cout<<"Qingyu\n";
}
signed main(){
IOS;
int T=1;
cin>>T;
_rep(i,1,T){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5696kb
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 Kevin Qingyu
result:
ok 3 tokens
Test #2:
score: -100
Wrong Answer
time: 3ms
memory: 5716kb
input:
10000 3 5 5 3 5 4 5 3 1 4 3 1 1 3 3 1 6 3 3 4 4 3 3 4 1 3 1 1 3 5 6 6 3 1 3 3 4 5 1 5 6 5 3 6 2 4 4 6 1 3 4 6 4 4 2 4 3 6 4 1 6 4 6 3 2 4 6 4 2 3 3 2 4 1 5 5 4 3 1 3 6 5 1 1 3 3 2 1 5 3 1 3 6 6 6 2 2 5 3 1 5 2 5 3 3 3 1 3 3 5 4 5 3 1 3 4 2 4 5 3 3 5 6 2 2 2 3 4 3 3 1 2 6 3 3 3 3 3 6 3 3 4 1 3 6 6 4 ...
output:
Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Kevin Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Kevin Kevin Qingyu Qingyu ...
result:
wrong answer 3rd words differ - expected: 'Kevin', found: 'Qingyu'