Submission #117283

#TimeUsernameProblemLanguageResultExecution timeMemory
117283WongHokFong_cppThe Big Prize (IOI17_prize)C++14
20 / 100
2 ms400 KiB
#include <iostream> #include "prize.h" #include <vector> using namespace std; vector <int> res; int find_best(int n) { int l=0,r=n-1; do { int mid=(l+r)/2; res=ask(mid); if (res[0]>0) r=mid-1; else if (res[1]>0) l=mid+1; else return mid; } while (l<r); return l; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...