Submission #288973

#TimeUsernameProblemLanguageResultExecution timeMemory
288973TouubsThe Big Prize (IOI17_prize)C++17
20 / 100
1 ms512 KiB
#include "prize.h" int find_best(int n) { int min = 0; int max = n; while (min + 1 < max) { int mid = (min + max) / 2; if (ask(mid)[0] == 0) min = mid; else max = mid; } return min; for(int i = 0; i < n; i++) { std::vector<int> res = ask(i); if(res[0] + res[1] == 0) return i; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...