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;
void solve(int N)
{
mt19937 mt(time(nullptr));
int limit=60;
if(N<=50)
limit=50;
limit/=2;
while(limit--)
{
int gdzie=mt()%N+1;
int ile=kth(gdzie);
if(cnt(ile)>N/2)
{
say_answer(ile);
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... |