This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |