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;
void solve(int n)
{
int Q;
if (n <= 50)
Q = 50;
else
Q = 60;
for (int q = 0; q<Q; q+=2)
{
int i;
i = rand();
i %= n, i++;
i = kth(i);
if (cnt(i) > n/3)
{
say_answer(i);
return;
}
}
say_answer(-1);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |