Submission #26718

#TimeUsernameProblemLanguageResultExecution timeMemory
26718baactreeHotter Colder (IOI10_hottercolder)C++14
50 / 100
887 ms8388 KiB
#include "grader.h" int HC(int N){ int le,ri; le=1; ri=N; while(true){ if(le==ri) return le; int a=(le*2+ri)/3; int b=(le+ri*2)/3; if(a==b) b++; 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=(a+b)/2-1; else ri=(a+b)/2; } } return 0; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:14:13: warning: unused variable 'g' [-Wunused-variable]
         int g=Guess(a);
             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...