제출 #1366017

#제출 시각아이디문제언어결과실행 시간메모리
1366017yc11커다란 상품 (IOI17_prize)C++20
20 / 100
0 ms412 KiB
#include "prize.h"
#include<bits/stdc++.h>
int find_best(int n) {
	int a = 0;
	int b = n;
	while (b>a){
        int x= (b+a)/2;
        std::vector<int> c = ask(x);
      
        if (c[0]==c[1]) return x;
        else if (c[0]==1) b = x-1;
        else a = x+1;
	}
	return b;
}

#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…