Submission #364300

#TimeUsernameProblemLanguageResultExecution timeMemory
364300AlexandruabcdeCONSUL (info1cup19_consul)C++14
100 / 100
27 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 += 4) { int x = kth(i); if (cnt(x) > n/3) { say_answer(x); return; } } } else { for (int i = 1; i <= n; i += 35) { 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...