Submission #566423

#TimeUsernameProblemLanguageResultExecution timeMemory
566423TemmieThe Big Prize (IOI17_prize)C++17
20 / 100
1 ms336 KiB
//#include "public_a/cpp/prize.h" #include "prize.h" #include <bits/stdc++.h> int find_best(int n) { if (!ask(0)[1]) { return 0; } int ans = 0; int l = 1, r = n - 1; while (l <= r) { int mid = (l + r) >> 1; if (!ask(mid)[0]) { ans = mid; l = mid + 1; } else { r = mid - 1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...