# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
642319 | 2022-09-19T08:33:08 Z | cigneve | Guess the number (BOI20_guess) | C++14 | 0 ms | 208 KB |
#pragma GCC optimize ("O3") #include <stdio.h> int main(){ int N,input=5; scanf("%d",&N); int l=1,r=N; while (input!=0){ printf("? %d\n",(r-l)/2+l); scanf("%d",&input); if (input==1){ l=(r-l)/2+l; } else if (input==-1){ r=(r-l)/2+l; } } printf("= %d",(r-l)/2+l); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 208 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |