//#include "grader.h"
#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define chmax(x, v) x = max(x, v)
#define chmin(x, v) x = min(x, v)
#define pb push_back
#define pii pair<int, int>
#define sz(x) (int)x.size()
#define x first
#define y second
#define int long long
using namespace std;
int HC(int N){
int l = 1, r = N, prev = (l + r)/2 + 1;
int ans = Guess(prev);
while (r > l){
int mid = (l + r)/2;
int delta = prev - mid;
int mtn = mid - delta;
// cout << l << " " << r << " " << mid << endl;
// cout << prev << " " << mtn << endl;
ans = Guess(mtn);
if ((ans >= 0)^(prev > mtn))
l = mid;
else
r = mid;
prev = mtn;
}
return l;
}
Compilation message
hottercolder.cpp: In function 'long long int HC(long long int)':
hottercolder.cpp:17:17: error: 'Guess' was not declared in this scope
17 | int ans = Guess(prev);
| ^~~~~