Submission #754482

# Submission time Handle Problem Language Result Execution time Memory
754482 2023-06-07T21:29:10 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++17
0 / 100
721 ms 262144 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;


int HC(int n){
    int st = 1;
    int dr = n;
    Guess(1);
    int x = Guess(n);
    while(st <= dr){
        int mij = (st + dr) / 2;
        if(x == 0)
            return mij;
        else if(x > 0){
            st = mij + 1;
            Guess(n);
            int x = Guess(st);
        }
        else{
            dr = mij - 1;
            Guess(1);
            int x = Guess(dr);
        }
    }
    return st;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:18:17: warning: unused variable 'x' [-Wunused-variable]
   18 |             int x = Guess(st);
      |                 ^
hottercolder.cpp:23:17: warning: unused variable 'x' [-Wunused-variable]
   23 |             int x = Guess(dr);
      |                 ^
# Verdict Execution time Memory Grader output
1 Incorrect 57 ms 34380 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 34348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 53 ms 34276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 721 ms 262144 KB Output isn't correct - alpha = 0.000000000000