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;
const int MAXN = 1000;
int v[MAXN+1];
void solve(int N) {
srand(time(NULL));
for (int i = 1; i <= N; i++)
v[i] = -1;
for (int i = 1; i <= 25; i++) {
int p = rand() % N + 1;
while (v[p] != -1) p = rand() % N + 1;
v[p] = kth(p);
int c = cnt(v[p]);
if (c * 3 > N) {
say_answer(v[p]);
return;
}
}
say_answer(-1);
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |