# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
360861 | ezdp | CONSUL (info1cup19_consul) | C++14 | 39 ms | 512 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"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
void solve(int n)
{
set<ll> s;
srand(42069);
while(s.size() < min(29, n / 2)){
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);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |