# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
319565 | 2020-11-05T14:05:06 Z | ehdtjskaqhd | Hotter Colder (IOI10_hottercolder) | C++17 | 737 ms | 44900 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; int HC(int N) { int l = 1, r = N, res, lg = -1; auto gs = [&](int g) -> int {return Guess(lg = g);}; while (r - l > 1) { if (lg == l) res = gs(r); else if (lg == r) res = -gs(l); else gs(l), res = gs(r); int mid = (l + r) / 2, adj = (l + r) % 2; if (!res) return mid; else if (~res) l = mid + adj; else r = mid; } return res > 0 ? r : l; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 32 ms | 6764 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 32 ms | 6756 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 34 ms | 6636 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 737 ms | 44900 KB | Output isn't correct - alpha = 0.000000000000 |