제출 #426785

#제출 시각아이디문제언어결과실행 시간메모리
426785MOUF_MAHMALATThe Big Prize (IOI17_prize)C++14
20 / 100
108 ms320 KiB
#include "prize.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
ll b[5009],l,r,m;
vector<ll>v;
int find_best(int n)
{
    l=0,r=n-1;
    while(l<=r)
    {
       m=(l+r)/2;
       v=ask(m);
       if(v[0]+v[1]==0)
        return m;
       if(v[0])
        r=m-1;
       else 
        l=m+1;
    }
}

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

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