# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
231489 | muhammad_hokimiyon | Hotter Colder (IOI10_hottercolder) | C++14 | 659 ms | 11572 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<bits/stdc++.h>
#include "grader.h"
using namespace std;
int HC(int nn)
{
int Q = 0;
int ls1 = 0;
int l = 1 , r = nn;
while( l < r ){
int m = (l + r) / 2;
if( l == 1 && r == 2 ){
int x1 = Guess(1);
int x2 = Guess(2);
if( x2 == 1 )return 2;
return 1;
}
int x1 = Guess(m - 1);
int x2 = Guess(m + 1);
if( x2 == 0 ){
return m;
}
if( x2 == 1 )l = m + 1;
else r = m - 1;
}
return l;
}
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... |