# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1152190 | boropoto | CONSUL (info1cup19_consul) | C++20 | 0 ms | 408 KiB |
#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
void solve(int n)
{
random_device rd;
mt19937 rng(rd());
uniform_int_distribution <> d(1, n);
int l=0;
for(int i=1; i<=30; i++)
{
if(cnt(kth(d(rng)))>n/3)
{
say_answer(kth(d(rng)));
break;
}
else
{
l++;
}
}
if(l==30)
{
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... |