Submission #628352

# Submission time Handle Problem Language Result Execution time Memory
628352 2022-08-13T10:46:40 Z abcvuitunggio Hotter Colder (IOI10_hottercolder) C++17
0 / 100
513 ms 211964 KB
#include "grader.h"
using namespace std;
int HC(int N){
    int cnt=1,l=1,r=500,kq=500,val;
    int last=500;
    val=Guess(500);
    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 116 ms 88988 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 116 ms 89028 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 120 ms 88992 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 513 ms 211964 KB Output isn't correct - alpha = 0.000000000000