제출 #469006

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



int find_best(int N) {
    int s = 0;
    int e = N;
    while(s + 1 != e) {
        int mid = s + e >> 1;
        vector<int> V = ask(mid);
        if(V[0]==0&&V[1]==0) return mid;
        if(V[0]==1) e = mid;
        else s = mid;
    }
}

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

prize.cpp: In function 'int find_best(int)':
prize.cpp:11:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   11 |         int mid = s + e >> 1;
      |                   ~~^~~
prize.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...