# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
639103 | LucaLucaM | 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 "grader.h."
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int Q = 25 + 5*(n > 50);
Q = min(Q, n);
for (int query = 0; query<Q; query++)
{
int i;
i = chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count();
i = abs(i), i %= n, i++;
i = kth(i);
if (cnt(i) > n/3)
{
say_answer(i);
return 0;
}
}
say_answer(-1);
return 0;
}