# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125903 | Masterdan | The Big Prize (IOI17_prize) | C++14 | 74 ms | 1172 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>
#define MIN -1
#define MAX 1000000000
#define all(a) a.begin (), a.end ()
#define mp make_pair
#define pb push_back
using namespace std;
typedef vector <int> vi;
typedef long long int ll;
typedef pair <int, int> ii;
int binary (int a, int b){
vector <int> v;
v=ask(b/2);
if(v[0]==1){
binary(a, (a+b)/2);
}else binary((a+b)/2+1, b);
if(v[0]==0 and v[1]==0)return a;
}
int find_best(int n) {
return binary(0, n-1);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |