# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
930851 | boris_mihov | Ancient Machine (JOI21_ancient_machine) | C++17 | 47 ms | 8140 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <vector>
void Anna(int N, std::vector <char> s)
{
bool foundX = false;
for (int i = 0 ; i < N ; ++i)
{
if (!foundX && s[i] == 'X')
{
foundX = true;
Send(1);
} else if (foundX && s[i] == 'Z')
{
Send(1);
} else
{
Send(0);
}
}
}
#include "Bruno.h"
#include <vector>
void Bruno(int N, int L, std::vector <int> A)
{
int xPos = -1;
std::vector <int> pos;
for (int i = 0 ; i < N ; ++i)
{
if (A[i] == 1)
{
if (xPos == -1) xPos = i;
pos.push_back(i);
}
}
if (pos.empty()) return;
if (pos.back() < N - 1) pos.push_back(N - 1);
for (int i = 0 ; i < xPos ; ++i)
{
Remove(i);
}
for (int i = 1 ; i < pos.size() ; ++i)
{
for (int j = pos[i] - 1 ; j > pos[i - 1] ; --j)
{
Remove(j);
}
Remove(pos[i]);
}
Remove(pos[0]);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |