Submission #1133724

#TimeUsernameProblemLanguageResultExecution timeMemory
1133724lopkusThe Big Prize (IOI17_prize)C++20
20 / 100
0 ms408 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int l = 0, r = n - 1, ans = 0; while(l <= r) { int mid = (l + r) / 2; vector<int> V = ask(mid); if(V[0] + V[1] == 0) { ans = mid; break; } if(V[1]) { l = mid + 1; } else { r = mid - 1; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...