Submission #364299

#TimeUsernameProblemLanguageResultExecution timeMemory
364299AlexandruabcdeCONSUL (info1cup19_consul)C++14
59.78 / 100
39 ms256 KiB
#include "grader.h" void solve(int n) { if (n <= 40) { for (int i = 1; i <= n; ++ i ) { int x = kth(i); if (cnt(x) > n/3) { say_answer(x); return; } } } else if (n <= 100) { for (int i = 1; i <= n; i += 3) { int x = kth(i); if (cnt(x) > n/3) { say_answer(x); return; } } } else { for (int i = 1; i <= n; i += 30) { int x = kth(i); if (cnt(x) > n/3) { say_answer(x); return; } } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...