# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
928553 | 2024-02-16T16:09:15 Z | denniskim | Ancient Machine (JOI21_ancient_machine) | C++17 | 45 ms | 8572 KB |
#include "Anna.h" #include <vector> namespace { int X = -1; } void Anna(int N, std::vector<char> S) { for(int i = 0 ; i < N ; i++) { int ff = 0; if(S[i] == 'X') { if(X == -1) ff = 1, X = i; } else if(S[i] == 'Z') { if(i == N - 1 || S[i + 1] != 'Z') ff = 1; } Send(ff); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 796 KB | Output is correct |
2 | Correct | 0 ms | 792 KB | Output is correct |
3 | Incorrect | 0 ms | 780 KB | Wrong Answer [6] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 45 ms | 8336 KB | Partially correct |
2 | Incorrect | 40 ms | 8572 KB | Wrong Answer [6] |
3 | Halted | 0 ms | 0 KB | - |