Submission #927200

#TimeUsernameProblemLanguageResultExecution timeMemory
927200vjudge1Hotter Colder (IOI10_hottercolder)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

void HC(int n) {
    int l = 1, r = n, mid;
    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 (stderr)

hottercolder.cpp: In function 'void HC(int)':
hottercolder.cpp:6:5: error: 'last' was not declared in this scope
    6 |     last = n;
      |     ^~~~
hottercolder.cpp:7:5: error: 'Guess' was not declared in this scope
    7 |     Guess(n);
      |     ^~~~~