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"
#define fi first
#define se second
#define pb push_back
#define ll long long
using namespace std;
map<int,int>m;
void solve(int n)
{
for(int i=1;i<=min(25,n);i++)
{
int w=rand();
w%=n;w++;
int x=kth(i);
if(m[x])continue;
int y=cnt(x);
if(y>n/3)
{
say_answer(x);return;
}
m[x]=1;
}
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... |