Submission #927251

# Submission time Handle Problem Language Result Execution time Memory
927251 2024-02-14T14:07:59 Z vjudge1 Hotter Colder (IOI10_hottercolder) C++11
0 / 100
10000 ms 8012 KB
#include <bits/stdc++.h>
using namespace std;

int Guess(int);

int HC(int n) {
    int l = 1, r = n, resL, resR;
    while(true) {
        resL = Guess(l);
        resR = Guess(r);
        if(resR == 1) l++;
        else if(resR == -1) r--;
        else {
            return (r + l) >> 1;
        }
    }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:7:23: warning: variable 'resL' set but not used [-Wunused-but-set-variable]
    7 |     int l = 1, r = n, resL, resR;
      |                       ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 106 ms 6748 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 106 ms 6748 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 106 ms 6748 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10032 ms 8012 KB Time limit exceeded
2 Halted 0 ms 0 KB -