QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#418261#8549. The Gamerobinyqc#WA 12ms3660kbC++20518b2024-05-23 12:12:332024-05-23 12:12:34

Judging History

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

  • [2024-05-23 12:12:34]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:3660kb
  • [2024-05-23 12:12:33]
  • 提交

answer

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;
template<typename T> using vec = vector<T>;
int cnt[2000005];
void solve()
{
    int n;cin>>n;
    for(int i=1;i<=2*n;i++){
        int a;cin>>a;
        cnt[a]++;
    }
    int sum=0;
    for(int i=1;i<=2*n;i++){
        if(cnt[i]>1)sum+=cnt[i];
        cnt[i]=0;
    }
    if(sum>n)puts("Qingyu");
    else puts("Kevin");
}

signed main()
{
    int t;
    cin >> t;
    while (t--) solve();
    return 0;
}

详细

Test #1:

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

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: 12ms
memory: 3660kb

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

result:

wrong answer 3rd words differ - expected: 'Kevin', found: 'Qingyu'