Submission #1082499

# Submission time Handle Problem Language Result Execution time Memory
1082499 2024-08-31T13:56:33 Z aaaaaarroz Hotter Colder (IOI10_hottercolder) C++17
0 / 100
10000 ms 24448 KB
#include "grader.h"

int HC(int N){
   int l=1,r=N;
   int pivot=1;
   while(l<r){
      Guess(pivot);
      int res=Guess((l+r)/2);
      if(res==0){
         return (l+r)/2;
      }
      else if(res==-1){
         r=(l+r)/2;
         r--;
      }
      else if(res==1){
         l=(l+r)/2;
         l++;
      }
   }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^
# Verdict Execution time Memory Grader output
1 Execution timed out 10073 ms 2908 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10018 ms 3068 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10006 ms 2904 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10022 ms 24448 KB Time limit exceeded
2 Halted 0 ms 0 KB -