# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
935480 | SmuggingSpun | Ancient Machine (JOI21_ancient_machine) | C++17 | 61 ms | 10196 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
void Anna(int n, vector<char>S){
for(char& c : S){
if(c == 'X'){
Send(0);
Send(0);
}
else if(c == 'Y'){
Send(1);
Send(0);
}
else{
Send(0);
Send(1);
}
}
}
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
void Bruno(int n, int sz_a, vector<int>A){
const int X = 0, Y = 1, Z = 2;
vector<int>a(n);
for(int i = 0; i < sz_a; i += 2){
a[i >> 1] = A[i] + (A[i + 1] << 1);
}
int ptr = n - 1;
while(ptr > -1 && a[ptr] != Z){
Remove(ptr--);
}
if(ptr > -1){
int last = ptr--;
while(ptr > -1){
int r_ptr = ptr;
while(ptr > -1 && a[ptr] != X){
ptr--;
}
for(int i = ptr + 1; i <= r_ptr; i++){
Remove(i);
}
while(ptr > -1 && a[ptr] == X){
Remove(ptr--);
}
}
Remove(last);
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |