Submission #165372

#TimeUsernameProblemLanguageResultExecution timeMemory
165372johuthaThe Big Prize (IOI17_prize)C++14
20 / 100
9 ms404 KiB
#include "prize.h" int find_best(int n) { int l = -1; int r = n; while (r - l > 1) { int mid = (r + l) / 2; auto a = ask(mid); if (a[0] + a[1] == 0) return mid; if (a[0] < a[1]) { l = mid; } else { r = mid; } } return l; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...