# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
725013 | piOOE | Ancient Machine (JOI21_ancient_machine) | C++17 | 75 ms | 8048 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(int n, std::vector<char> s) {
int type = 0;
for (int i = 0; i < n; ++i) {
int use = 0;
if (s[i] == 'X') {
if (type == 0) {
type |= 1;
use = 1;
}
} else if (s[i] == 'Y') {
if ((type & 1) && !(type & 2)) {
type |= 2;
use = 1;
}
} else if (s[i] == 'Z') {
if ((type & 1) && (type & 2)) {
type ^= 2;
use = 1;
}
}
Send(use);
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int N, int L, std::vector<int> A) {
for (int i = 0; i < N; ++i) {
if (A[i] == 0) {
Remove(i);
}
}
int fi = find(A.begin(), A.end(), 1) - A.begin();
if (fi != N) {
for (int i = fi + 1; i < N; ++i) {
if (A[i] == 1) {
Remove(i);
}
}
Remove(fi);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |