QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#603386 | #8549. The Game | flyasdfvcxz | TL | 0ms | 11384kb | C++14 | 618b | 2024-10-01 16:18:13 | 2024-10-01 16:18:13 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int a[N] = {};
void solve()
{
int n, ans = 0;
cin >> n;
memset(a, 0, sizeof(a));
for (int i = 1; i <= n * 2; i++)
{
int x;
cin >> x;
if (++a[x] == 1)
{
ans++;
}
}
if (ans > n)
{
cout << "Kevin\n";
}
else
{
cout << "Qingyu\n";
}
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int T;
cin >> T;
while (T--)
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 11384kb
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
Time Limit Exceeded
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 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 Qingy...