Submission #315038

#TimeUsernameProblemLanguageResultExecution timeMemory
315038daniel920712CONSUL (info1cup19_consul)C++14
0 / 100
106 ms256 KiB
#include "grader.h" #include <map> using namespace std; map < int , int > all; void solve(int n) { all.clear(); int i,t,big=0,xx=n,x; for(i=1;i<=n;i++) { t=kth(i); all[t]++; if(all[t]==10) { x=cnt(t); big=max(big,x); xx-=(x-10); } if(big>n/3) { //printf("%d %d\n",big,n/3); say_answer(t); return; } if(big+(xx-i)<=n/3) { say_answer(-1); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...