| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 820503 | vjudge1 | The Big Prize (IOI17_prize) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
//#include"books.h"
using namespace std ;
//vector<int> ask(int ind)
//{
// vector<int> v(2) ;
// cout << "? " << ind << '\n' ;
// cin >> v[0] >> v[1] ;
// return v ;
//}
int find_best(int n)
{
int l = -1, r = n ;
while(l + 1 < r)
{
int mid = (l + r) / 2 ;
vector<int> v = ask(mid) ;
if(!v[0] && !v[1])
return mid ;
else
{
if(v[0])
r = mid ;
else
l = mid ;
}
}
return l ;
}
//signed main()
//{
// int n ;
// cin >> n ;
// cout<<find_best(n) ;
// return 0 ;
//}
