제출 #1252232

#제출 시각아이디문제언어결과실행 시간메모리
1252232PlayVoltz커다란 상품 (IOI17_prize)C++20
20 / 100
23 ms408 KiB
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;

int find_best(int n){
	int low=-1, high=n;
	while (low+1<high){
		int mid=(low+high)/2;
		vector<int> res=ask(mid);
		if (!(res[0]+res[1]))return mid;
		if (res[0])high=mid;
		else low=mid;
	}
}

컴파일 시 표준 에러 (stderr) 메시지

prize.cpp: In function 'int find_best(int)':
prize.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...