Submission #790672

#TimeUsernameProblemLanguageResultExecution timeMemory
790672petezaThe Big Prize (IOI17_prize)C++14
20 / 100
83 ms1156 KiB
#include "prize.h" int b_search(int l, int r) { int mid = (l+r) >> 1; std::vector<int> res = ask(mid); if(!res[0] && !res[1]) return mid; else if(res[0]) return b_search(l, mid-1); else return b_search(mid+1, r); } int find_best(int n) { return b_search(0, n-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...