QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576610 | #8549. The Game | ucup-team4435# | WA | 3ms | 3616kb | C++20 | 701b | 2024-09-19 21:15:49 | 2024-09-19 21:15:51 |
Judging History
answer
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
void solve() {
int n;
cin >> n;
vector cnt(2 * n, 0);
for (int i = 0, x; i < 2 * n; ++i) {
cin >> x;
cnt[x] += 1;
}
int c = 0, free = 0;
for (int x : cnt) {
if (x == 1) {
c += 1;
} else if (x > 1) {
free += x - 2;
}
}
if (c <= free) {
cout << "Qingyu\n";
} else {
cout << "Kevin\n";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int test = 1;
cin >> test;
while (test--) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
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: 3584kb
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 Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Qingyu Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Kevin Qingyu Qingyu Qi...
result:
wrong answer 9th words differ - expected: 'Qingyu', found: 'Kevin'