# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
800077 | Sohsoh84 | Ancient Machine (JOI21_ancient_machine) | C++17 | 64 ms | 8956 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 0;
}
void Anna(int N, vector<char> S) {
variable_example++;
int tflagind = -1;
vector<int> ans = {0};
for (int i = 1; i < N; i++) {
ans.push_back(S[i - 1] == 'Z');
}
int ind = 0;
while (S[ind] != 'X' && ind < N) ind++;
if (ind == N) return;
for (int i = 0; i <= ind; i++) ans[i] = 0;
ans[ind] = 1;
for (int i = N - 2; i >= 0; i--)
if (ans[i] + ans[i + 1] == 2)
ans[i] = 0;
for (int e : ans)
Send(e);
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 0;
int FunctionExample(int P) { return 1 - P; }
} // namespace
void Bruno(int N, int L, std::vector<int> TA) {
if (!L) {
for (int i = 0; i < N; i++)
Remove(i);
return;
}
int ind = 0;
vector<int> A(N);
while (!TA[ind]) ind++;
for (int i = 0; i < ind; i++)
A[i] = 1;
A[N - 1] = 1;
for (int i = ind + 1; i < N; i++)
A[i - 1] = TA[i];
stack<int> st;
bool flag = false;
for (int i = 0; i < N; i++) {
if (A[i]) {
while (st.size() > 1) {
Remove(st.top());
st.pop();
}
Remove(i);
} else st.push(i);
}
while (!st.empty()) {
Remove(st.top());
st.pop();
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |