Submission #239484

# Submission time Handle Problem Language Result Execution time Memory
239484 2020-06-15T21:30:17 Z DavidDamian Hotter Colder (IOI10_hottercolder) C++11
77 / 100
714 ms 8568 KB
#include "grader.h"
///Subtask 3
///Binary Search with the fact that we can get "same"
int HC(int N){
    int L=1,R=N;
    while(L<R){
        int mid=(L+R)/2;
        Guess(L);
        int ans=Guess(R);
        if(ans==0)
            return mid;
        if(ans==1)
            L=mid+1;
        else{
            if((L-R+1)%2==0)
                R=mid;
            else
                R=mid-1;
        }
    }
    return L;
}
# Verdict Execution time Memory Grader output
1 Correct 25 ms 1280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 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 714 ms 8568 KB Output is partially correct - alpha = 0.068965517241