Submission #1012394

# Submission time Handle Problem Language Result Execution time Memory
1012394 2024-07-02T05:47:40 Z huutuan Hotter Colder (IOI10_hottercolder) C++14
50 / 100
388 ms 8208 KB
#include "grader.h"

int HC(int N){
   int l=1, r=N;
   int cnt=0;
   while (l<=r){
      int mid=(l+r)>>1;
      if (l==r) return mid;
      Guess(l);
      int t=Guess(r);
      if (!t) return mid;
      if (t==1) l=mid+1;
      else r=mid;
   }
   return -1;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:5:8: warning: unused variable 'cnt' [-Wunused-variable]
    5 |    int cnt=0;
      |        ^~~
# Verdict Execution time Memory Grader output
1 Correct 17 ms 3160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 2904 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 388 ms 8208 KB Output isn't correct - alpha = 0.000000000000
2 Halted 0 ms 0 KB -