제출 #419710

#제출 시각아이디문제언어결과실행 시간메모리
419710amoo_safarAncient Machine (JOI21_ancient_machine)C++17
70 / 100
75 ms8388 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; void Anna(int _n, vector<char> S) { int fl = 0; for(auto c : S){ int rs = 0; if(fl == 1 && c == 'Z') rs = 1; if(fl == 0 && c == 'X') fl = 1, rs = 1; Send(rs); } }
#include "Bruno.h" #include <bits/stdc++.h> using namespace std; void Bruno(int _n, int L, vector<int> A) { int cnt = 0; vector<int> mk(_n, 0); for (int i = 0; i < L; i++) { if(A[i] == 1){ cnt ++; for(int j = i - 1; j >= 0; j--){ if(A[j] == 1) break; Remove(j); mk[j] = 1; } if(cnt != 1){ Remove(i); mk[i] = 1; } } } for(int i = 0; i < _n; i++) if(!mk[i]) Remove(i); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...