QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#390452#8549. The Gameucup-team992WA 4ms3588kbC++23579b2024-04-15 15:48:242024-04-15 15:48:25

Judging History

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

  • [2024-04-15 15:48:25]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:3588kb
  • [2024-04-15 15:48:24]
  • 提交

answer

//
// Created by codicon on 4/15/2024 at 9:45 AM.
//

#include <bits/stdc++.h>

using namespace std;

int main() {
    cin.tie(0)->sync_with_stdio(0);

    int t; cin >> t;
    while (t--) {
        int n; cin >> n;

        map<int, int> cnt;
        for (int i = 0; i < 2*n; i++) {
            int a; cin >> a;
            cnt[a]++;
        }

        int cnt1 = 0;
        for (auto [a, occ]: cnt) {
            if (occ == 1) {
                cnt1++;
            }
        }

        cout << (cnt1 >= n-1 ? "Kevin" : "Qingyu") << '\n';
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 4ms
memory: 3588kb

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'