Submission #222290

# Submission time Handle Problem Language Result Execution time Memory
222290 2020-04-13T02:27:19 Z mathking1021 Hotter Colder (IOI10_hottercolder) C++11
77 / 100
708 ms 24568 KB
#include "grader.h"

int HC(int N)
{
    int lt = 1, rt = N;
    while(lt < rt)
    {
        Guess(lt);
        int t = Guess(rt);
        if(t == 0) return (lt + rt) / 2;
        if(t == 1)
        {
            lt = (lt + rt + 2) / 2;
        }
        else
        {
            rt = (lt + rt - 1) / 2;
        }
    }
    return lt;
}
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 708 ms 24568 KB Output is partially correct - alpha = 0.068965517241