QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#408827 | #8549. The Game | daduoli# | WA | 5ms | 5876kb | C++14 | 536b | 2024-05-11 07:57:57 | 2024-05-11 07:57:57 |
Judging History
answer
#include<bits/stdc++.h>
typedef long long LL;
using namespace std;
const int MAXN=2e6+10;
int n;
int a[MAXN],b[MAXN];
void vmain() {
scanf("%d",&n);
n<<=1;
for(int i=1;i<=n;++i) {
scanf("%d",&a[i]);
++b[a[i]];
}
int cnt=0,cc=0;
for(int i=1;i<=n;++i) {
if(b[i]<2&&b[i]) ++cnt;
if(b[i]>=2) cc+=b[i]-2+1;
}
// cout<<cc<<" "<<cnt<<endl;
if(cc<=cnt) puts("Kevin");
else puts("Qingyu");
for(int i=1;i<=n;++i) --b[a[i]];
}
int main () {
int T;
scanf("%d",&T);
while(T--) vmain();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 5824kb
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: 0
Accepted
time: 4ms
memory: 5876kb
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 Kevin Qingyu Kevin Kevin Kevin Qingyu Qingyu Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Qingyu Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Qingyu Qingy...
result:
ok 10000 tokens
Test #3:
score: -100
Wrong Answer
time: 5ms
memory: 5816kb
input:
10000 4 5 7 5 4 2 3 8 2 4 5 3 3 7 7 1 2 6 4 7 4 5 1 5 6 6 4 4 8 7 7 8 1 7 2 2 4 6 7 7 1 8 1 1 3 4 5 4 1 8 6 1 2 6 4 2 8 3 4 2 4 8 7 4 3 3 1 7 7 7 2 3 4 4 7 2 1 3 7 4 7 4 2 3 8 5 3 8 3 8 4 3 4 3 1 3 1 4 4 4 3 6 5 2 2 6 4 7 4 7 6 6 4 3 3 8 6 4 5 2 1 5 4 7 5 6 4 1 7 3 2 2 5 8 5 4 8 8 3 7 2 3 6 6 4 7 5 ...
output:
Kevin Kevin Qingyu Qingyu Kevin Kevin Qingyu Qingyu Kevin Qingyu Qingyu Kevin Kevin Kevin Kevin Qingyu Kevin Qingyu Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Qingyu Qingyu Kevin Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Qingyu Kevin Qingyu Kevin Qingyu Qingyu K...
result:
wrong answer 3rd words differ - expected: 'Kevin', found: 'Qingyu'