답안 #853243

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
853243 2023-09-23T18:15:35 Z JoksimKaktus Hotter Colder (IOI10_hottercolder) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

int HC(int N_){
    int l = 1; int r = N_;
    int g = r;
    guess(l);
    int res;
    while(true){
        int k = guess(g);
        int mid = (l+r)/2;
        if(k == 0){
            res = mid;
            break;
        }else if(k == 1){
            if(g != r){
                guess(r);
            }
            l = mid;
            g = l;
        }else{
            if(g != l){
                guess(l);
            }
            r = mid;
            g = r;
        }
    }
    return res;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:9:5: error: 'guess' was not declared in this scope; did you mean 'Guess'?
    9 |     guess(l);
      |     ^~~~~
      |     Guess