Submission #556619

# Submission time Handle Problem Language Result Execution time Memory
556619 2022-05-03T12:26:34 Z MohamedFaresNebili Hotter Colder (IOI10_hottercolder) C++14
0 / 100
611 ms 55192 KB
#include <bits/stdc++.h>
#include "grader.h"

        using namespace std;

        using ll = long long;
        using ii = pair<ll, ll>;
        using vi = vector<int>;

        #define ff first
        #define ss second
        #define pb push_back
        #define all(x) (x).begin(), (x).end()
        #define lb lower_bound
        /// #define int ll

        const int oo = 1e9 + 7;

        int HC(int N) {
            int lo = 1, hi = N;
            while(lo <= hi) {
                int md = (lo + hi) / 2;
                int aa = Guess(lo);
                int bb = Guess(hi);
                if(bb == -1) hi = md - 1;
                if(bb == 0) return md;
                if(bb == 1) lo = md + 1;
            }
            return N;
        }

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:23:21: warning: unused variable 'aa' [-Wunused-variable]
   23 |                 int aa = Guess(lo);
      |                     ^~
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 6996 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 6900 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 6988 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 611 ms 55192 KB Output isn't correct - alpha = 0.000000000000