제출 #228934

#제출 시각아이디문제언어결과실행 시간메모리
228934cfalasThe Big Prize (IOI17_prize)C++14
20 / 100
6 ms384 KiB
#include<bits/stdc++.h>
using namespace std;
#include "prize.h"
#define MID ((l+r)/2)

int find_best(int n) {
	int l=0, r=n-1;
	int m;
	while(l<=r){
		m = MID;
		vector<int> res = ask(m);
		if(res[0] + res[1] == 0)
			return m;
		if(res[0]) r = m-1;
		else l = m+1;
	}
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...