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 "grader.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(12345);
void solve(int n) {
int lim = (n <= 50 ? 50 : 60) / 2;
while (lim--) {
int k = rng() % n + 1, tmp = kth(k);
if (cnt(tmp) > n / 3) {
say_answer(tmp);
goto done;
}
}
say_answer(-1);
done:;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |