제출 #712955

#제출 시각아이디문제언어결과실행 시간메모리
712955dungnguyenn_05The Big Prize (IOI17_prize)C++17
20 / 100
1 ms336 KiB
#include "prize.h"
using namespace std;
typedef vector<int> vi;

int find_best(int n) {

	int l=0,r=n-1,pos=0;
	while(l<=r)
	{
		int mid=(l+r)>>1;
		vi res=ask(mid);

		if(res[1]==0)
		{
			pos=mid;
			r=mid-1;
		}
		else
			l=mid+1;
	}

	return pos;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...