# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
364111 | ahmedfouadnew | CONSUL (info1cup19_consul) | C++17 | 848 ms | 380 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 "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
void solve(int n)
{
vector<int>v;
for(int i=1;i<=n;i++)
{
v.pb(kth(i));
}
sort(v.begin(),v.end());
int cur=0;
for(int i=0;i<v.size();i++)
{
if(!i)
{
cur=1;
}
else
{
if(v[i]==v[i-1])
{
cur++;
}
else cur=1;
}
if(cur>n/3)
{
say_answer(v[i]);
break;
}
}
}
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... |