Submission #628356

# Submission time Handle Problem Language Result Execution time Memory
628356 2022-08-13T10:48:35 Z abcvuitunggio Hotter Colder (IOI10_hottercolder) C++17
0 / 100
1702 ms 262144 KB
#include "grader.h"
using namespace std;
int HC(int N){
    int cnt=1,l=1,r=N,kq=N,val;
    int last=N;
    val=Guess(N);
    while (l<r){
        int mid=l+r-last;
        val=Guess(mid);
        cnt++;
        if (val==0){
            kq=(mid+last)/2;
            break;
        }
        if (val==1){
            if (last<mid)
                l=(last+mid+1)/2;
            else{
                r=(last+mid-1)/2;
                kq=r;
            }
            last=mid;
            continue;
        }
        if (last<mid){
            r=(last+mid-1)/2;
            kq=r;
        }
        else
            l=(last+mid+1)/2;
        last=mid;
    }
    return kq;
}
# Verdict Execution time Memory Grader output
1 Incorrect 80 ms 57164 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 84 ms 57248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 88 ms 57228 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1702 ms 262144 KB Output isn't correct - alpha = 0.000000000000