# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
800034 | 2023-08-01T09:30:19 Z | Sohsoh84 | Ancient Machine (JOI21_ancient_machine) | C++17 | 49 ms | 8604 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++; bool flag = true; vector<int> A; for (int i = 0; i < N; i++) { A.push_back((S[i] == 'Z')); } int ind = 0; while (S[ind] != 'X' && ind < N) ind++; if (ind == N) return; for (int i = N - 2; i >= 0; i--) if (A[i] == 1 && A[i + 1] == 1) A[i] = 0; for (int i = 0; i <= ind; i++) A[i] = 0; if (ind) A[ind - 1] = 1; for (int e : A) Send(e); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 592 KB | Output is correct |
2 | Correct | 2 ms | 560 KB | Output is correct |
3 | Incorrect | 1 ms | 512 KB | Wrong Answer [6] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 41 ms | 8604 KB | Partially correct |
2 | Partially correct | 47 ms | 8584 KB | Partially correct |
3 | Partially correct | 49 ms | 8468 KB | Partially correct |
4 | Incorrect | 42 ms | 8504 KB | Wrong Answer [6] |
5 | Halted | 0 ms | 0 KB | - |