이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i, n) for(ll i = 0; i<(n); i++)
#define F first
#define S second
#define pb push_back
#define deb(x) cout << #x << " = " << (x) << endl
#define deb2(x, y) cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
typedef vector<ll> vl;
typedef vector<vl> vvl;
int find_best(int n);
std::vector<int> ask(int i);
int find_best(int n){
    ll lo = 0;
    ll hi = n;
    while(hi-lo>1){
        ll mid = (hi+lo) / 2;
        vector<int> res = ask(mid);
        if(res[0] ==0 && res[1] == 0){
            return mid;
        }
        if(res[0]) hi = mid;
        else lo = mid+1;
    }
    return lo;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |