Submission #119508

# Submission time Handle Problem Language Result Execution time Memory
119508 2019-06-21T10:44:15 Z Plurm Hotter Colder (IOI10_hottercolder) C++11
25 / 100
751 ms 8280 KB
#include "grader.h"
#include <cstdio>
int HC(int N){
    int lo = 1;
    int hi = N;
    while(lo+1 < hi){
        Guess(lo);
        int mid = (lo + hi)/2;
        int r = Guess(mid);
        if(r > 0){
            int rr = Guess(hi);
            if(rr > 0){
                lo = (mid + hi)/2 + 1;
            }else{
                lo = (lo + mid)/2 + 1;
                hi = (mid + hi)/2;
            }
        }else{
            hi = (lo + mid)/2;
        }
    }
    if(lo == hi) return lo;
    Guess(lo);
    if(Guess(hi) == 1) return hi;
    else return lo;
}
# Verdict Execution time Memory Grader output
1 Correct 27 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 1272 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 1272 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 751 ms 8280 KB Output isn't correct - alpha = 0.000000000000