Submission #1012392

# Submission time Handle Problem Language Result Execution time Memory
1012392 2024-07-02T05:38:41 Z huutuan Hotter Colder (IOI10_hottercolder) C++14
25 / 100
403 ms 8208 KB
#include "grader.h"

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

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:7:11: warning: unused variable 't1' [-Wunused-variable]
    7 |       int t1=Guess(l);
      |           ^~
# Verdict Execution time Memory Grader output
1 Correct 17 ms 2908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 17 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 403 ms 8208 KB Output isn't correct - alpha = 0.000000000000
2 Halted 0 ms 0 KB -