QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#586506 | #8549. The Game | ciuim | WA | 1ms | 5996kb | C++14 | 1.6kb | 2024-09-24 13:41:21 | 2024-09-24 13:41:21 |
Judging History
answer
bool M1;
#define look_memory cerr<<abs(&M2-&M1)/1024.0/1024<<" MB\n"
#define look_time cerr<<(clock()-Time)*1.0/CLOCKS_PER_SEC<<'\n'
#include <cstdio>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <cstring>
#include <array>
#include <algorithm>
#include <queue>
#include <vector>
#include <bitset>
#include <ctime>
#include <cstdlib>
#include <random>
#include <set>
#include <ctime>
#include <map>
#include <stack>
#include <unordered_map>
#include <assert.h>
#define i128 __int128
#define ll long long
#define uint unsigned
#define ull unsigned long long
#define fo(a,b,c) for(ll a=b;a<=c;++a)
#define re(a,b,c) for(ll a=b;a>=c;--a)
#define pii pair<ll,ll>
#define pdd pair<db,db>
#define fi first
#define pb push_back
#define se second
#define ite set<pii> ::iterator
#define vite vector<ll> ::iterator
using namespace std;
const ll mod=998244353;
inline ll gi()
{
ll x = 0, f = 1;
char ch = getchar();
while(ch < '0' || ch > '9')
{
if (ch == '-')
f = -1;
ch = getchar();
}
while(ch >= '0' && ch <= '9')
{
x = (x<<1) + (x<<3) + (ch^48);
ch = getchar();
}
return x * f;
}
ll _=1;
const ll inf=2e17+5,iinf=2e9;
const ll N=500005;
ll a[N],n,buk[N];
void sol()
{
n=gi();
fo(i,1,2*n) a[i]=gi(),buk[i]=0;
ll ans=0;
fo(i,1,n*2)
{
buk[a[i]]++;
}
fo(i,1,2*n)
{
if(buk[a[i]])
{
ans+=buk[a[i]]-1;
}
}
if(ans>=n) cout<<"Qingyu";
else cout<<"Kevin";
}
bool M2;
int main()
{
int Time=clock();
look_memory;
_=gi();
while(_--)
{
sol();
printf("\n");
}
look_time;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5996kb
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: 0ms
memory: 5924kb
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 Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Kevin Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Kevin Qingyu Qingyu Qingyu Qingyu Qingyu Kevin Qingyu Kevin Kevin Qingyu Qingyu ...
result:
wrong answer 3rd words differ - expected: 'Kevin', found: 'Qingyu'