# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1071043 | ttamx | Ancient Machine (JOI21_ancient_machine) | C++17 | 56 ms | 8232 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(int n,vector<char> s){
char tar='X';
for(int i=0;i<n;i++){
if(s[i]==tar){
Send(1);
tar='Z';
}else{
Send(0);
}
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int n,int m,vector<int> a){
stack<int> s;
int p=-1;
for(int i=0;i<n;i++){
if(p==-1){
if(a[i]){
p=i;
}else{
Remove(i);
}
}else{
if(a[i]){
while(!s.empty()){
Remove(s.top());
s.pop();
}
Remove(i);
}else{
s.emplace(i);
}
}
}
while(!s.empty()){
Remove(s.top());
s.pop();
}
if(p!=-1){
Remove(p);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |