# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
427127 | MOUF_MAHMALAT | The Big Prize (IOI17_prize) | C++14 | 109 ms | 280 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;
typedef int ll;
vector<ll>v,w,x;
ll l,r,m;
int find_best(int n)
{
v=ask(0);
l=0,r=n-1;
while(l<=r)
{
m=(l+r)/2;
w=ask(m);
if(w[0]+w[1]==0)
return m;
if(v==w)
{
l=m+1;
continue;
}
for(ll i=l; i<=min(n-1,l+100); i++)
{
x=ask(i);
if(x[0]+x[1]==0)
return i;
v=x;
}
l+=100;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |