# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
800077 | 2023-08-01T09:48:51 Z | Sohsoh84 | Ancient Machine (JOI21_ancient_machine) | C++17 | 64 ms | 8956 KB |
#include "Anna.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 0; } void Anna(int N, vector<char> S) { variable_example++; int tflagind = -1; vector<int> ans = {0}; for (int i = 1; i < N; i++) { ans.push_back(S[i - 1] == 'Z'); } int ind = 0; while (S[ind] != 'X' && ind < N) ind++; if (ind == N) return; for (int i = 0; i <= ind; i++) ans[i] = 0; ans[ind] = 1; for (int i = N - 2; i >= 0; i--) if (ans[i] + ans[i + 1] == 2) ans[i] = 0; for (int e : ans) Send(e); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 508 KB | Output is correct |
2 | Correct | 0 ms | 508 KB | Output is correct |
3 | Correct | 0 ms | 520 KB | Output is correct |
4 | Correct | 0 ms | 508 KB | Output is correct |
5 | Correct | 0 ms | 516 KB | Output is correct |
6 | Correct | 0 ms | 568 KB | Output is correct |
7 | Correct | 0 ms | 516 KB | Output is correct |
8 | Correct | 0 ms | 516 KB | Output is correct |
9 | Correct | 0 ms | 508 KB | Output is correct |
10 | Correct | 0 ms | 508 KB | Output is correct |
11 | Correct | 0 ms | 508 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 50 ms | 8360 KB | Partially correct |
2 | Partially correct | 40 ms | 8320 KB | Partially correct |
3 | Partially correct | 55 ms | 8348 KB | Partially correct |
4 | Partially correct | 47 ms | 8348 KB | Partially correct |
5 | Partially correct | 40 ms | 8384 KB | Partially correct |
6 | Partially correct | 40 ms | 8384 KB | Partially correct |
7 | Partially correct | 41 ms | 8420 KB | Partially correct |
8 | Partially correct | 47 ms | 8376 KB | Partially correct |
9 | Partially correct | 40 ms | 8352 KB | Partially correct |
10 | Partially correct | 51 ms | 8316 KB | Partially correct |
11 | Partially correct | 51 ms | 8292 KB | Partially correct |
12 | Partially correct | 46 ms | 8364 KB | Partially correct |
13 | Partially correct | 46 ms | 8392 KB | Partially correct |
14 | Partially correct | 45 ms | 8320 KB | Partially correct |
15 | Partially correct | 64 ms | 8392 KB | Partially correct |
16 | Partially correct | 43 ms | 8348 KB | Partially correct |
17 | Partially correct | 47 ms | 8368 KB | Partially correct |
18 | Correct | 40 ms | 7280 KB | Output is correct |
19 | Correct | 38 ms | 7408 KB | Output is correct |
20 | Partially correct | 40 ms | 8956 KB | Partially correct |
21 | Partially correct | 45 ms | 8720 KB | Partially correct |
22 | Partially correct | 59 ms | 8832 KB | Partially correct |
23 | Partially correct | 40 ms | 8840 KB | Partially correct |
24 | Partially correct | 40 ms | 8816 KB | Partially correct |
25 | Correct | 33 ms | 7524 KB | Output is correct |
26 | Partially correct | 40 ms | 8852 KB | Partially correct |
27 | Partially correct | 47 ms | 8808 KB | Partially correct |
28 | Partially correct | 40 ms | 8744 KB | Partially correct |
29 | Correct | 42 ms | 7312 KB | Output is correct |
30 | Partially correct | 53 ms | 8612 KB | Partially correct |
31 | Correct | 34 ms | 7432 KB | Output is correct |
32 | Partially correct | 41 ms | 8804 KB | Partially correct |
33 | Partially correct | 49 ms | 8784 KB | Partially correct |