# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
935499 | SmuggingSpun | Ancient Machine (JOI21_ancient_machine) | C++17 | 40 ms | 8064 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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--;
}
while(ptr > -1 && S[ptr] == 'X'){
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);
}
Remove(ptr--);
while(ptr > -1 && A[ptr] == 1){
Remove(ptr--);
}
}
Remove(last);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |