QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#586510 | #8549. The Game | ciuim | WA | 1ms | 5992kb | C++14 | 1.6kb | 2024-09-24 13:43:02 | 2024-09-24 13:43:06 |
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++;
}
}
if(ans>n) cout<<"Kevin";
else cout<<"Qingyu";
}
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: 0
Wrong Answer
time: 1ms
memory: 5992kb
input:
3 3 1 1 4 5 1 4 2 1 2 3 4 4 1 2 2 3 2 1 1 4
output:
Kevin Kevin Kevin
result:
wrong answer 1st words differ - expected: 'Qingyu', found: 'Kevin'