Submission #131275

# Submission time Handle Problem Language Result Execution time Memory
131275 2019-07-16T23:09:31 Z dragonslayerit Hotter Colder (IOI10_hottercolder) C++14
0 / 100
800 ms 136280 KB
#include "grader.h"

int HC(int N){
  Guess(1);
  int low=1,high=N;
  while(true){
    if(low==high) return low;
    int g=Guess(high);
    if(g==0) return (low+high)/2;
    if(g>0){
      low=(low+high)/2+1;
    }else{
      high=(low+high-1)/2;
    }
    if(low==high) return low;
    g=Guess(low);
    if(g==0) return (low+high)/2;
    if(g<0){
      low=(low+high)/2+1;
    }else{
      high=(low+high-1)/2;
    }
  }
}
# Verdict Execution time Memory Grader output
1 Incorrect 41 ms 14076 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 38 ms 14072 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 49 ms 14016 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 800 ms 136280 KB Output isn't correct - alpha = 0.000000000000