#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int a,b,c,d,e,i,j,ii,jj,zx,xc,Q,t,tes,f[200009],bo[200009];
/*int kth(int k);
void say_answer(int k);
int cnt(int k);*/
int nicerand(int q){
int w=0,we=1;
while(q>0){
q--;
if(rand()%2!=0) w+=we;
we*=2;
}
return w;
}
void solve(int n)
{
/// insert your code
/// for example
/*if(cnt(kth(1)) > n / 3) say_answer(kth(1));
else say_answer(-1);*/
a=n;
if(n<=50) Q=50; else Q=60;
e=0;
while(e<=Q){
c=nicerand(20)%a+1;
e+=2;
zx=kth(c);
xc=cnt(zx);
if(xc>a/3){
say_answer(zx);
exit(0);
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - token expected |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - token expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - token expected |
2 |
Halted |
0 ms |
0 KB |
- |