제출 #296930

#제출 시각아이디문제언어결과실행 시간메모리
296930Muhammetali커다란 상품 (IOI17_prize)C++11
20 / 100
87 ms384 KiB
#include "prize.h"
#include <bits/stdc++.h>
#define mp make_pair
#define f first
#define s second
#define sz(x) (int)(x).size()
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pf push_front
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
int find_best(int n)
{
	int l=0,r=n-1;
	while(l<r)
	{
		int mid=(l+r)/2;
		vi v=ask(mid);
		if (v[0]==0 && v[1]==0) return mid;
		else if (v[0]==1)r=mid;
		else l=mid+1;
	}
}

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

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