Submission #26714

#TimeUsernameProblemLanguageResultExecution timeMemory
26714baactreeHotter Colder (IOI10_hottercolder)C++14
Compilation error
0 ms0 KiB
#include "grader.h" int HC(int N){ int le,ri; le=1; ri=N; while(true){ int k=(n+2)/3; int g=Guess(k); int p=Guess(k*2); if(p==0){ return (k*3)/2; } else if(p>0){ le=(k*3)/2+1; } else{ if(k&1) ri=(k*3)/2; else ri=(k*3)/2-1; } if(le==ri) return le; } return 0; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:8:16: error: 'n' was not declared in this scope
         int k=(n+2)/3;
                ^
hottercolder.cpp:9:13: warning: unused variable 'g' [-Wunused-variable]
         int g=Guess(k);
             ^