# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1030316 | 2024-07-22T02:36:50 Z | sleepntsheep | Colors (BOI20_colors) | C | 0 ms | 344 KB |
#include<stdio.h> #include<stdlib.h> int a_; int ask(int c){printf("? %d\n",c);fflush(stdout);scanf("%d",&a_);return a_;} [[noreturn]] void report(int C){printf("= %d\n", C);fflush(stdout);exit(0);} int main(){ long long n; scanf("%lld",&n); if(n>1e9)return 1; int lb=0,ub=n+1; ask(1); while(ub-lb>1){ int m=lb+(ub-lb)/2; if(ask(m+1))ub=m; else lb=m; ask(1); } printf("%lld\n",(long long)ub); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Token parameter [name=cmd] equals to "4", doesn't correspond to pattern "[?=]" |
2 | Halted | 0 ms | 0 KB | - |