# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
137046 | 2019-07-27T02:25:01 Z | StevenH | Hotter Colder (IOI10_hottercolder) | C++14 | 747 ms | 8356 KB |
#include "grader.h" int HC(int N){ int left=1,right=N; bool last = 0; Guess(left); while(left+1 < right) { int res; int mid=(left+right)/2; if(last==0) { res = Guess(right); if(res == -1) { right = mid; Guess(right); last = 1; } else if(res == 1) { left = mid; last = 1; //next is left } else if(res == 0) { return mid; } } else { res = Guess(left); if(res == -1) { left = mid; Guess(left); last = 0; } else if(res == 1) { right = mid; last = 0; //next is left } else if(res == 0) { return mid; } } } if(right == left+1) { int res; if(last == 0) { res = Guess(right); if(res == 1)return right; else return left; } else if(last == 1) { res = Guess(left); if(res == 1)return left; else return right; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 26 ms | 1276 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 27 ms | 1272 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 39 ms | 1272 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 747 ms | 8356 KB | Output isn't correct - alpha = 0.000000000000 |