Submission #227781

# Submission time Handle Problem Language Result Execution time Memory
227781 2020-04-28T18:36:20 Z muhammad_hokimiyon Hotter Colder (IOI10_hottercolder) C++14
50 / 100
706 ms 8184 KB
#include<bits/stdc++.h>
#include "grader.h"

using namespace std;

int HC(int nn)
{
    int l = 1 , r = nn;
    if( nn == 2 ){
        int x = Guess(1);
        int y = Guess(2);
        if( y == -1 )return 1;
        return 2;
    }
    while( l < r ){
        int m = (l + r) / 2;
        int y2 = Guess( m );
        int y1 = Guess( m + 1 );
        if( y1 == 1 )l = m + 1;
        else r = m;
    }
    return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:10:13: warning: unused variable 'x' [-Wunused-variable]
         int x = Guess(1);
             ^
hottercolder.cpp:17:13: warning: unused variable 'y2' [-Wunused-variable]
         int y2 = Guess( m );
             ^~
# Verdict Execution time Memory Grader output
1 Correct 26 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 Incorrect 25 ms 1280 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 706 ms 8184 KB Output isn't correct - alpha = 0.000000000000