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) {
srand(time(NULL));
int limit = 0;
if(n <= 50)limit = 25;
else limit=30;
for(int k = 0;k<limit;k++) {
int i = rand()%n + 1;
long long num = kth(i);
if(cnt(num) > (n+2)/ 3){
say_answer(num);
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... |