# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206413 | anonymous | The Big Prize (IOI17_prize) | C++14 | 5 ms | 376 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<vector>
#include<map>
#include<utility>
using namespace std;
map<int, map<int, pair<int,int> > > M;
int slv(int l, int r) {
if (l == r) {return(l);}
int mid = (l + r) >> 1;
vector<int> res = ask(mid);
int s = res[0] + res[1];
if (s == 0) {return(mid);}
if (res[0]) {slv(l,mid-1);}
if (res[1]) {slv(mid+1,r);}
}
int find_best(int n) {
return(slv(0, n-1));
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |