# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1076414 | Warinchai | Ancient Machine (JOI21_ancient_machine) | C++17 | 60 ms | 10008 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
void Anna(int N, std::vector<char> S) {
for(auto x:S){
if(x=='X')Send(1),Send(0);
else if(x=='Y')Send(0),Send(1);
else Send(0),Send(0);
}
}
#include "Bruno.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
// namespace
void Bruno(int N, int L, std::vector<int> A) {
int st=-1;
string s;
for(int i=0;i<L;i+=2){
if(A[i]==0&&A[i+1]==1)s.push_back('Y');
else if(A[i]==0&&A[i+1]==0)s.push_back('Z');
else s.push_back('X');
}
//cerr<<s<<"\n";
for(int i=0;i<N;i++){
if(s[i]=='X'){
st=i;
break;
}
Remove(i);
}
if(st==-1)return;
//cerr<<"work\n";
int cur=st;
int check=0;
int id=0;
for(int i=st;i<N;i++){
if(s[i]=='Z'){
for(int j=i-1;j>cur;j--){
Remove(j);
}
Remove(i);
cur=i;
}
}
for(int i=N-1;i>cur;i--)Remove(i);
//cerr<<"st:"<<st<<"\n";
Remove(st);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |