# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59537 | aquablitz11 | Hotter Colder (IOI10_hottercolder) | C++14 | 849 ms | 8212 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 <cassert>
#include <random>
#include "grader.h"
using namespace std;
mt19937 rd(31415926);
uniform_int_distribution<int> dis(0, 1);
int HC(int n)
{
int l = 1;
int r = n;
Guess(1);
int p = 1;
while (l < r) {
int z = r-l+1;
int res, side;
if (p == l) {
res = Guess(p = r), side = 0;
} else if (p == r) {
res = Guess(p = l), side = 1;
} else if (p < l) {
int q = r+(l-p);
if (q <= n) {
res = Guess(p = q);
side = 0;
} else {
Guess(p = (r <= n/2 ? r : l));
continue;
}
# | 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... |