# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
265134 | 2020-08-14T13:21:26 Z | Toirov_Sadi | Hotter Colder (IOI10_hottercolder) | C++17 | 830 ms | 8184 KB |
#include<bits/stdc++.h> #include "grader.h" using namespace std; int rec(int l, int r, int last){ if(l == r) return l; int m = (l + r) / 2; if(m == last && m > l) m --; else if(m == last) m ++; int x = Guess(m); if(x == 0){ return (m + last) / 2; } if(x == 1){ if(m < last) return rec(l, (m + last - 1) / 2, m); else return rec((m + last + 1) / 2, r, m); } if(x == -1){ if(m < last) return rec((m + last + 1) / 2, r, m); else return rec(l, (last + m - 1) / 2, m); } } int HC(int N){ if(N == 1) return 1; Guess(N / 2); return rec(1, N, N / 2); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 28 ms | 1280 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 27 ms | 1280 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 29 ms | 1360 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 830 ms | 8184 KB | Output isn't correct - alpha = 0.000000000000 |