Submission #1164677

#TimeUsernameProblemLanguageResultExecution timeMemory
1164677SmuggingSpun커다란 상품 (IOI17_prize)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h
#include "prize.h"
using namespace std;
int find_best(int n) {
	int low = 0, high = n - 1;
    while(low <= high){
        int mid = (low + high) >> 1;
        vector<int>ret = ask(mid);
        if(ret[0] == 0 && ret[1] == 0){
            return mid;
        }
        if(ret[0] == 1){
            high = mid - 1;
        }
        else{
            low = mid + 1;
        }
    }
}

Compilation message (stderr)

prize.cpp:1:23: error: missing terminating > character
    1 | #include<bits/stdc++.h
      |                       ^
prize.cpp: In function 'int find_best(int)':
prize.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^