# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
246731 | SomeoneUnknown | CONSUL (info1cup19_consul) | C++14 | 37 ms | 432 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;
void solve(int n)
{
/// insert your code
/// for example
int polls = 54;
int fchecks = 6;
vector<int> surveyres;
if(n <= 60){
for(int i = 1; i <= n; i++){
surveyres.push_back(kth(i));
}
sort(surveyres.begin(), surveyres.end());
int prv = 0;
int amt = 0;
for(int i = 0; i < n; i++){
if(prv != surveyres[i]){
prv = surveyres[i];
amt = 0;
}
++amt;
if(amt * 3 > n){
say_answer(prv);
return;
}
}
say_answer(-1);
return;
}
}
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... |