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;
mt19937 rnd(145324523412);
void solve(int n)
{
int cntt = 50 / 2;
while(cntt--)
{
int val = rnd() % n + 1;
int nr = kth(val);
int freq = cnt(nr);
if(freq > n / 3)
{
say_answer(nr);
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... |