제출 #430055

#제출 시각아이디문제언어결과실행 시간메모리
430055moyindavidThe Big Prize (IOI17_prize)C++17
0 / 100
144 ms200 KiB
#include <bits/stdc++.h>
#include <prize.h>
using namespace std;

int find_best(int n){
    for(int y=n/2;y>=0 && y<n;){
        vector<int> a = ask(y);
        if(a[0]==1){
            y/=2;
        }
        else if(a[1]==1){
            y+=y/2;
        }
        else{
            return y;
        }
    }
}


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

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