Submission #364682

#TimeUsernameProblemLanguageResultExecution timeMemory
364682valerikkCONSUL (info1cup19_consul)C++17
100 / 100
35 ms364 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; void solve(int n) { mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count()); uniform_int_distribution<int> rd(1, n); int q = min(60, n); for (int qq = 0; qq < q / 2; qq++) { int i = rd(gen); int x = kth(i); if (3 * cnt(x) > n) { 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...