# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100737 | Kirill22 | CONSUL (info1cup19_consul) | C++17 | 0 ms | 0 KiB |
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"
using namespace std;
mt19937 gen(22);
int n;
void solve(int N) {
n = N;
int limit = n <= 50 ? 50 : 60;
for (int i = 0; i < limit; i += 2) {
int pos = gen() % n + 1;
int x = kth(pos);
if (cnt(x) > n / 3) {
say_answer(x);
return;
}
}
say_answer(-1);
}