# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
950740 | 2024-03-20T16:03:43 Z | andrei_boaca | Ancient Machine (JOI21_ancient_machine) | C++17 | 50 ms | 8216 KB |
#include "Anna.h" #include <bits/stdc++.h> #include <vector> using namespace std; namespace { } void Anna(int N, std::vector<char> S) { bool havex=0; for(int i=0;i<N;i++) { if(S[i]=='X') { if(!havex) Send(1); else Send(0); havex=1; continue; } if(!havex) { Send(0); continue; } if(S[i]=='Z'&&(i==N||S[i+1]=='Y')) Send(1); else Send(0); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 780 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 50 ms | 8216 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |