Submission #523491

#TimeUsernameProblemLanguageResultExecution timeMemory
523491AGECONSUL (info1cup19_consul)C++14
100 / 100
26 ms292 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...