| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1076140 | amin | The Big Prize (IOI17_prize) | C++14 | 58 ms | 344 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;
vector<int>q;
int find_best(int n) {
    int cur=0;
    while(cur!=n)
    {
       // cout<<cur<<endl;
 q=ask(cur);
 int p=q[0];
 int pp=q[1];
 if(p==0&&pp==0)
    return cur;
        int l=0;
        int r=n-cur;
        while(l<r-1)
        {
            int mid=(l+r)/2;
           q=ask(cur+mid);
           if(p==q[0]&&pp==q[1])
           {
               l=mid;
           }else
           r=mid;
        }
        cur=r+cur;
    }
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
