Submission #26715

#TimeUsernameProblemLanguageResultExecution timeMemory
26715baactreeHotter 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 a=(le*2+ri)/3; int b=(le+ri*2)/3; int g=Guess(a); int p=Guess(b); if(p==0){ return (a+b)/2; } else if(p>0){ le=(a+b)/2+1; } else{ if((a+b)%2==0) ri=(k*3)/2-1; else ri=(k*3)/2; } if(le==ri) return le; } return 0; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:20:21: error: 'k' was not declared in this scope
                 ri=(k*3)/2-1;
                     ^
hottercolder.cpp:22:21: error: 'k' was not declared in this scope
                 ri=(k*3)/2;
                     ^
hottercolder.cpp:10:13: warning: unused variable 'g' [-Wunused-variable]
         int g=Guess(a);
             ^