Submission #146301

# Submission time Handle Problem Language Result Execution time Memory
146301 2019-08-23T11:26:26 Z popovicirobert Hotter Colder (IOI10_hottercolder) C++14
50 / 100
700 ms 124152 KB
#include "grader.h"
#include <bits/stdc++.h>

using namespace std;

int HC(int n){
    if(n == 1) {
        return 1;
    }
    int res = 1;
    for(int step = 1 << 8; step; step >>= 1) {
        if(res + step <= n) {
            int cur = Guess(res + step);
            if(res + step > 1 && Guess(res + step - 1) == -1) {
                res += step;
            }

        }
    }
    return res;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:13:17: warning: unused variable 'cur' [-Wunused-variable]
             int cur = Guess(res + step);
                 ^~~
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 1400 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 700 ms 124152 KB Output isn't correct - alpha = 0.000000000000