# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
371363 | leinad2 | The Big Prize (IOI17_prize) | C++17 | 118 ms | 1132 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 "prize.h"
#include<bits/stdc++.h>
using namespace std;
int A[200010];
int find_best(int n)
{
while(1)
{
int a=0, b=n-1;
while(a<b)
{
int m=a+b>>1;
vector<int>v=ask(m);
if(v[0]+v[1]==0)return m;
if(v[1]>A[m+1])a=m+1;
else b=m;
}
for(int i=0;i++<a;)A[i]++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |