Submission #263446

#TimeUsernameProblemLanguageResultExecution timeMemory
263446jairRSThe Big Prize (IOI17_prize)C++17
20 / 100
1 ms504 KiB
#include "prize.h" using namespace std; int find_best(int n) { int lo = 0, hi = n - 1; while (true) { int mid = (hi + lo) / 2; vector<int> res = ask(mid); if (res[0] == res[1]) { return mid; } else if (res[0] > res[1]) { hi = mid - 1; } else { lo = mid + 1; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...