# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
315029 | daniel920712 | CONSUL (info1cup19_consul) | C++14 | 2 ms | 256 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 <map>
using namespace std;
map < int , int > all;
void solve(int n)
{
int i,t,big,xx=n,x;
for(i=1;i<=n;i++)
{
t=kth(i);
all[t]++;
if(all[t]==10)
{
xx=cnt(t);
big=max(big,xx);
n-=(xx-10);
}
big=max(big,all[t]);
if(all[t]>n/3)
{
say_answer(t);
return;
}
if(big+(xx-i)<=n/3)
{
say_answer(-1);
return;
}
}
say_answer(-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... |