제출 #1028701

#제출 시각아이디문제언어결과실행 시간메모리
1028701parsadox2The Big Prize (IOI17_prize)C++17
20 / 100
51 ms344 KiB
#include "prize.h"
#include <bits/stdc++.h>

using namespace std;

int find_best(int n) {
	int low = -1 , high = n;
	int ans = -1;
	while(high - low > 0)
	{
		int mid = (low + high) >> 1;
		auto res = ask(mid);
		if(res[0] + res[1] == 0)
		{
			ans = mid;
			break;
		}
		if(res[0] == 0)
			low = mid;
		else
			high = mid;
	}
	return ans;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...