Submission #556598

#TimeUsernameProblemLanguageResultExecution timeMemory
556598MohamedFaresNebiliHotter Colder (IOI10_hottercolder)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using ii = pair<ll, ll>; using vi = vector<int>; #define ff first #define ss second #define pb push_back #define all(x) (x).begin(), (x).end() #define lb lower_bound /// #define int ll const int oo = 1e9 + 7; int HC(int N) { int lo = 1, hi = N, pr = 1; Guess(1); while(lo <= hi) { int to = (lo + hi) / 2; int r = Guess(to), md = (to + pr) / 2 + 1 - (to + pr) % 2; if(to > pr) { if(r == -1) hi = md - 1; if(r == 0) return (to + pr) / 2; if(r == 1) lo = md + 1; } if(to < pr) { if(r == -1) lo = md + 1; if(r == 0) return (to + pr) / 2; if(r == 1) hi = md - 1; } pr = to; } return N; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:19:41: error: 'Guess' was not declared in this scope
   19 |             int lo = 1, hi = N, pr = 1; Guess(1);
      |                                         ^~~~~
hottercolder.cpp:24:38: error: 'md' was not declared in this scope
   24 |                     if(r == -1) hi = md - 1;
      |                                      ^~
hottercolder.cpp:26:37: error: 'md' was not declared in this scope
   26 |                     if(r == 1) lo = md + 1;
      |                                     ^~
hottercolder.cpp:29:38: error: 'md' was not declared in this scope
   29 |                     if(r == -1) lo = md + 1;
      |                                      ^~
hottercolder.cpp:31:37: error: 'md' was not declared in this scope
   31 |                     if(r == 1) hi = md - 1;
      |                                     ^~