This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "prize.h"
using namespace std;
using ll = long long;
using ii = pair<ll, ll>;
using vi = vector<ll>;
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(), x.end()
#define lb lower_bound
#define ub upper_bound
int find_best(int n) {
int lo = 0, hi = n - 1;
while(lo <= hi) {
int md = (lo + hi) / 2;
vector<int> res = ask(md);
if(res[0] + res[1] == 0) return md;
if(res[0] > res[1]) hi = md - 1;
else lo = md + 1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |