Submission #252311

# Submission time Handle Problem Language Result Execution time Memory
252311 2020-07-25T08:46:14 Z SamAnd Hotter Colder (IOI10_hottercolder) C++17
0 / 100
755 ms 47864 KB
#include "grader.h"
//#include "hottercolder.h"

int n;

int HC(int N)
{
    n = N;
    int l = 1, r = n;
    while (l <= r)
    {
        int m = (l + r) / 2;
        Guess(l);
        int u = Guess(r);
        if (u == 0)
        {
            return m;
        }
        if (u == 1)
            l = m + 1;
        else
            r = m - 1;
    }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 4088 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 4096 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 4096 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 755 ms 47864 KB Output isn't correct - alpha = 0.000000000000