Submission #1248776

#TimeUsernameProblemLanguageResultExecution timeMemory
1248776AlmontherHotter Colder (IOI10_hottercolder)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long #define co cout<< using namespace std; // stuff ll HC(ll N){ ll l=1,r=N,last=r; Guess(l); while(r-l>1){ ll x=Guess(last),mid=(l+r)/2; if(last==r){ if(x==-1) r=mid; else l=mid; } else{ if(x==-1) l=mid; else r=mid; } last=mid; } if(l==r) return l; else{ if(last==l){ ll x=Guess(r); if(x==1) return r; return l; } else{ ll x=Guess(l); if(x==1) return l; return r; } } }

Compilation message (stderr)

hottercolder.cpp: In function 'long long int HC(long long int)':
hottercolder.cpp:11:5: error: 'Guess' was not declared in this scope
   11 |     Guess(l);
      |     ^~~~~
hottercolder.cpp:15:25: error: 'mid' was not declared in this scope
   15 |             if(x==-1) r=mid;
      |                         ^~~
hottercolder.cpp:16:20: error: 'mid' was not declared in this scope
   16 |             else l=mid;
      |                    ^~~
hottercolder.cpp:19:25: error: 'mid' was not declared in this scope
   19 |             if(x==-1) l=mid;
      |                         ^~~
hottercolder.cpp:20:20: error: 'mid' was not declared in this scope
   20 |             else r=mid;
      |                    ^~~
hottercolder.cpp:22:14: error: 'mid' was not declared in this scope
   22 |         last=mid;
      |              ^~~