제출 #430064

#제출 시각아이디문제언어결과실행 시간메모리
430064moyindavid커다란 상품 (IOI17_prize)C++17
0 / 100
108 ms284 KiB
#include <bits/stdc++.h>
#include <prize.h>
using namespace std;

int find_best(int n){

    for(int y=n-1;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:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...