# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1062205 | pera | CONSUL (info1cup19_consul) | C++17 | 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<bits/stdc++.h>
#include "grader.h"
using namespace std;
int solve(int n){
srand(time(0));
vector<int> a(n + 1);
for(int x = 1;x <= 30;x ++){
int u = rand() % n + 1;
if(a[u]){
continue;
}
if(cnt(a[u] = kth(u)) > n / 3){
return a[u];
}
}
return -1;
}