# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562887 | saultapia | Hotter Colder (IOI10_hottercolder) | C++17 | 801 ms | 91480 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
int HC(int N){
int low = 1;
int high = N;
if(N == 1) return 1;
int ans = Guess(N / 2);
int l, r, mid, lftans, rghtans;
int midans = 0;
while(low <= high)
{
mid = (low + high) >> 1;
l = (low + mid) >> 1;
r = (mid + high) >> 1;
midans = Guess(mid);
lftans = Guess(l);
rghtans = Guess(r);
if(l == r)
{
return l;
}
if(lftans == -1)
{
low = l + 1;
}
if(rghtans == -1)
{
high = r - 1;
}
if(lftans == 1 || lftans == 0)
{
high = mid - 1;
}
if(rghtans == 1 || rghtans == 0)
{
low = mid + 1;
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |