제출 #935491

#제출 시각아이디문제언어결과실행 시간메모리
935491SmuggingSpunAncient Machine (JOI21_ancient_machine)C++17
0 / 100
49 ms8168 KiB
#include "Anna.h" #include<bits/stdc++.h> using namespace std; void Anna(int n, vector<char>S){ int ptr = n - 1; vector<int>send(n, 0); while(ptr > -1 && S[ptr] != 'Z'){ ptr--; } if(ptr > -1){ send[ptr--] = 1; while(ptr > -1){ while(ptr > -1 && S[ptr] != 'X'){ ptr--; } send[ptr] = 1; while(ptr > -1 && S[ptr] == 'X'){ ptr--; } send[ptr] = 1; } } for(int& x : send){ Send(x); } }
#include "Bruno.h" #include<bits/stdc++.h> using namespace std; void Bruno(int n, int sz_a, vector<int>A){ int ptr = n - 1; while(ptr > -1 && A[ptr] == 0){ Remove(ptr--); } if(ptr > -1){ int last = ptr--; while(ptr > -1){ int r_ptr = ptr; while(ptr > -1 && A[ptr] == 0){ ptr--; } for(int i = ptr + 1; i <= r_ptr; i++){ Remove(i); } if(ptr > -1){ Remove(ptr--); while(ptr > -1 && A[ptr] == 0){ Remove(ptr--); } } } Remove(last); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...