# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
523491 |
2022-02-07T17:39:43 Z |
AGE |
CONSUL (info1cup19_consul) |
C++14 |
|
26 ms |
292 KB |
#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve(int N){
int n=N;
map<int,int>mpp,mppp;
int cntt=min(N/2,(int)29);
while(cntt>=0){
int x=rand()%n;
if(mpp[x])continue;
int y=kth(x+1);
cntt--;
if(mppp[y])continue;
mppp[y]=1;
int yy=cnt(y);
if(yy>n/3){
say_answer(y);
return ;
}
mpp[x]=1;
}
say_answer(-1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
200 KB |
Output is correct |
2 |
Correct |
7 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
200 KB |
Output is correct |
2 |
Correct |
20 ms |
288 KB |
Output is correct |
3 |
Correct |
6 ms |
200 KB |
Output is correct |
4 |
Correct |
7 ms |
200 KB |
Output is correct |
5 |
Correct |
26 ms |
200 KB |
Output is correct |
6 |
Correct |
18 ms |
200 KB |
Output is correct |
7 |
Correct |
19 ms |
200 KB |
Output is correct |
8 |
Correct |
21 ms |
272 KB |
Output is correct |
9 |
Correct |
19 ms |
200 KB |
Output is correct |
10 |
Correct |
22 ms |
200 KB |
Output is correct |
11 |
Correct |
22 ms |
200 KB |
Output is correct |
12 |
Correct |
18 ms |
200 KB |
Output is correct |
13 |
Correct |
24 ms |
292 KB |
Output is correct |
14 |
Correct |
20 ms |
200 KB |
Output is correct |