제출 #712594

#제출 시각아이디문제언어결과실행 시간메모리
712594tht2005Ancient Machine (JOI21_ancient_machine)C++17
0 / 100
66 ms9804 KiB
#include "Anna.h" #include <vector> void Anna(int N, std::vector<char> S) { for(int i = 0; i < N; ++i) { if(S[i] == 'X') { Send(0); } else if(S[i] == 'Y') { Send(0); } else { Send(1); } } for(int i = 0; i < N; ++i) { if(S[i] == 'X') { Send(0); } else if(S[i] == 'Y') { Send(1); } else { Send(0); } } }
#include "Bruno.h" #include <vector> void Bruno(int N, int L, std::vector<int> A) { std::vector<int> S(N), stk; for(int i = 0; i < N; ++i) { S[i] = (A[i] << 1) | A[N + i]; while(!stk.empty() && S[stk.back()] != S[i] - 1) { Remove(stk.back()); stk.pop_back(); } stk.push_back(i); } for(int i : stk) { Remove(i); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...