# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
357666 | 2021-01-24T11:38:15 Z | urd05 | Colors (BOI20_colors) | C++14 | 1 ms | 364 KB |
#include <bits/stdc++.h> using namespace std; int main(void) { long long n; scanf("%lld",&n); long long l=2; long long r=n; long long now=1; printf("? %lld\n",now); fflush(stdout); int got; scanf("%d",&got); long long ret=1; for(int i=n-1;i>0;i--) { if (now==l-1) { now=r; r--; } else { now=l; l++; } printf("? %lld\n",now); fflush(stdout); scanf("%d",&got); if (got==0) { ret=i+1; break; } } return ret; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 364 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 364 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 364 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 364 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 364 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |