| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 427112 | MOUF_MAHMALAT | The Big Prize (IOI17_prize) | C++14 | 110 ms | 320 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;
int find_best(int n)
{
    v=ask(0);
    for(ll i=199; i<n; i+=200)
    {
        w=ask(i);
        if(w[0]+w[1]==0)
            return i;
        if(v!=w)
        {
            for(ll j=i-199; j<i; j++)
            {
                x=ask(j);
                if(x[0]+x[1]==0)
                    return j;
            }
            v=w;
        }
    }
    for(ll i=n-1; i>=max(0,n-199); i--)
    {
        v=ask(i);
        if(v[0]+v[1]==0)
            return i;
    }
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
