# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
798374 | ymm | Ancient Machine (JOI21_ancient_machine) | C++17 | 47 ms | 8400 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
#define Loop(x,l,r) for (ll x = (l); x < (r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x)
typedef long long ll;
using namespace std;
namespace {
int variable_example = 0;
}
void Anna(int N, std::vector<char> S) {
int p = 0;
while (p < N && S[p] != 'X')
++p;
if (p == N) {
Loop (i,0,N)
Send(0);
return;
}
Loop (i,0,p)
Send(0);
Send(1);
Loop (i,p+1,N)
Send(S[i] == 'Z');
}
#include "Bruno.h"
#include <bits/stdc++.h>
#define Loop(x,l,r) for (ll x = (l); x < (r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x)
typedef long long ll;
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> A) {
int p = 0;
while (p < N && !A[p])
++p;
if (p == N) {
Loop (i,0,N)
Remove(i);
return;
}
int lst = p+1;
Loop (p2,p+1,N) {
if (!A[p2])
continue;
LoopR (j,lst,p2)
Remove(j);
Remove(p2);
lst = p2+1;
}
Loop (i,0,p+1)
Remove(i);
Loop (i,lst,N)
Remove(i);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |