Submission #318525

#TimeUsernameProblemLanguageResultExecution timeMemory
318525johuthaCONSUL (info1cup19_consul)C++17
100 / 100
29 ms384 KiB
#include "grader.h" #include <random> #include <iostream> using namespace std; void solve(int n) { int mb = (n > 50 ? 30 : 25); mt19937 rng(n^mb); uniform_int_distribution<int> uni(0, 1e9); for (int i = 0; i < mb; i++) { int ind = uni(rng) % n; int cand = kth(ind + 1); int app = cnt(cand); if (app > n / 3) { say_answer(cand); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...