Submission #927209

# Submission time Handle Problem Language Result Execution time Memory
927209 2024-02-14T12:13:28 Z vjudge1 Hotter Colder (IOI10_hottercolder) C++11
Compilation error
0 ms 0 KB
void HC(int n) {
    int l = 1, r = n, mid;
    int last = n;
    Guess(n);
    while(true) {
        mid = (l + r) >> 1;
        int g = Guess(mid);
        if(g == 1) {
            r = mid;
        } else if(g == -1) {
            l = mid;
        } else {
            cout << (last - mid) / 2;
            return;
        }
        last = mid;
    }
}

Compilation message

hottercolder.cpp: In function 'void HC(int)':
hottercolder.cpp:4:5: error: 'Guess' was not declared in this scope
    4 |     Guess(n);
      |     ^~~~~
hottercolder.cpp:13:13: error: 'cout' was not declared in this scope
   13 |             cout << (last - mid) / 2;
      |             ^~~~