# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036016 | 2024-07-27T02:12:13 Z | sleepntsheep | COVID tests (CEOI24_covid) | C | 51 ms | 344 KB |
#include <stdio.h> #include <string.h> int n, t; double p; int main() { scanf("%d%lf%d", &n, &p, &t); while (t--) { char a[1000] = { 0 }; for (int i = 0; i < n; ++i) a[i] = '0'; int at = 0; while (at < n) { int lb = at - 1, ub = n; while (ub - lb > 1) { char q[1001] = { 0 }; for (int i = 0; i < n; ++i) q[i] = '0'; int md = lb + (ub - lb) / 2; for (int j = lb; j <= md; ++j) q[j] = '1'; printf("Q %s\n", q); fflush(stdout); char result; scanf(" %c", &result); if (result == 'P') ub = md; else lb = md; } if (ub < n) a[ub] = '1'; at = ub + 1; } printf("A %s\n", a); fflush(stdout); scanf(" %*c"); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 344 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 51 ms | 344 KB | translate:wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 13 |
2 | Halted | 0 ms | 0 KB | - |