Submission #933370

#TimeUsernameProblemLanguageResultExecution timeMemory
933370SulACONSUL (info1cup19_consul)C++17
100 / 100
24 ms444 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; void solve(int n) { vector<int> a; a.reserve(n); for (int i = 1; i <= n; i++) a.push_back(i); srand(time(NULL)); int queries = 30; while (queries--) { int i = (rand() % a.size()) + 1; int x = kth(i); if (cnt(x) > (n+2)/3) {say_answer(x); return;} } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...