Submission #523487

# Submission time Handle Problem Language Result Execution time Memory
523487 2022-02-07T17:34:32 Z AGE CONSUL (info1cup19_consul) C++14
86.85 / 100
28 ms 200 KB
#include<bits/stdc++.h>
#include "grader.h" 
using namespace std;
void solve(int N){
int n=N;
map<int,int>mpp;
int cntt=min(N/2,(int)30);
    while(cntt>=0){
        int x=rand()%n;
        if(mpp[x])continue;
        int y=kth(x+1);
        int yy=cnt(y);
        if(yy>n/3){
            say_answer(y);
            return ;
        }
        mpp[x]=1;
        cntt--;
    }
    say_answer(-1);
 
}
# Verdict Execution time Memory Grader output
1 Correct 12 ms 200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 23 ms 200 KB Output is partially correct
2 Correct 7 ms 200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 200 KB Output is partially correct
2 Partially correct 28 ms 200 KB Output is partially correct
3 Correct 9 ms 200 KB Output is correct
4 Correct 7 ms 200 KB Output is correct
5 Partially correct 23 ms 200 KB Output is partially correct
6 Partially correct 25 ms 200 KB Output is partially correct
7 Partially correct 24 ms 200 KB Output is partially correct
8 Partially correct 18 ms 200 KB Output is partially correct
9 Partially correct 11 ms 200 KB Output is partially correct
10 Partially correct 23 ms 200 KB Output is partially correct
11 Partially correct 28 ms 200 KB Output is partially correct
12 Partially correct 25 ms 200 KB Output is partially correct
13 Partially correct 27 ms 200 KB Output is partially correct
14 Partially correct 22 ms 200 KB Output is partially correct