QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#398813#8549. The Gameucup-team1196#WA 0ms3768kbC++20591b2024-04-25 18:30:552024-04-25 18:30:56

Judging History

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

  • [2024-04-25 18:30:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3768kb
  • [2024-04-25 18:30:55]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long

void solve() {
    int n;
    std::cin >> n;
    
    std::vector<int> a(2 * n + 1);
    for (int i = 1; i <= 2 * n; i++) {
    	int x;
    	std::cin >> x;
    	a[x]++;
	}
	
	int ans = 0;
	
	for (int i = 1; i <= 2 * n; i++) {
		ans += std::max(0ll, a[i] - 1);
	}
	
	if(ans >= n) {
		std::cout << "Qingyu\n";
	} else {
		std::cout << "Kelin\n";
	}
}

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int t = 1;
     cin >> t;
    while(t--) {
        solve();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3768kb

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
Kelin
Qingyu

result:

wrong answer 2nd words differ - expected: 'Kevin', found: 'Kelin'