# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1060872 | 2024-08-16T03:52:19 Z | onbert | The Big Prize (IOI17_prize) | C++17 | 0 ms | 0 KB |
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { int l = 0, r = n-1; while (l<r) { int mid = (l+r)/2; vector<int> val = ask(mid); if (val[0] + val[1]==n-1) return mid; if (val[0] < i) r = mid-1; else l = mid+1; } return l; }