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 ll long long
using namespace std;
void solve(int n)
{
set<ll> s;
srand(69696969);
while(s.size() < 29){
int i = rand() % n + 1;
if(!s.count(i)){
s.insert(i);
ll val = kth(i);
if(cnt(val) > n / 3){
say_answer(val);
return;
}
}
}
say_answer(cnt(kth(1)) > n / 3 ? kth(1) : -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... |