# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
360853 | ezdp | CONSUL (info1cup19_consul) | C++14 | 0 ms | 0 KiB |
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"
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);
}