QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#588257#8549. The GamehuaxiamengjinWA 3ms3708kbC++14366b2024-09-25 08:14:592024-09-25 08:15:01

Judging History

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

  • [2024-09-25 08:15:01]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3708kb
  • [2024-09-25 08:14:59]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n,a[2002002];
void solve(){
	cin>>n;n*=2;
	int cnt=0;
	for (int i=1;i<=n;i++)
	a[i]=0;
	for (int i=1,x;i<=n;i++)
	cin>>x,a[x]++;
	for (int i=1;i<=n;i++)
	if(a[i]==1)cnt++;
	else if(a[i]&1)cnt--;
	if(cnt<=1)cout<<"Qingyu\n";
	else cout<<"Kevin\n";
}
int main(){
	int T;cin>>T;
	while(T--)solve();
} 

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3552kb

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: 3708kb

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:

Kevin
Qingyu
Kevin
Qingyu
Kevin
Kevin
Kevin
Kevin
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
Qingyu
...

result:

wrong answer 1st words differ - expected: 'Qingyu', found: 'Kevin'