제출 #1272930

#제출 시각아이디문제언어결과실행 시간메모리
1272930hgmhc커다란 상품 (IOI17_prize)C++20
20 / 100
1 ms400 KiB
#include "prize.h"

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