# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
642142 | skittles1412 | Ancient Machine (JOI21_ancient_machine) | C++17 | 53 ms | 8080 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/extc++.h"
using namespace std;
template <typename T>
void dbgh(const T& t) {
cerr << t << endl;
}
template <typename T, typename... U>
void dbgh(const T& t, const U&... u) {
cerr << t << " | ";
dbgh(u...);
}
#ifdef DEBUG
#define dbg(...) \
cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]" \
<< ": "; \
dbgh(__VA_ARGS__)
#else
#define cerr \
if (false) \
cerr
#define dbg(...)
#endif
#define endl "\n"
#define long int64_t
#define sz(x) int(std::size(x))
void Send(int a);
void Anna(int n, vector<char> arr) {
int i = 0;
auto send_until = [&](char c) -> void {
while (i < n) {
if (arr[i++] == c) {
Send(1);
break;
} else {
Send(0);
}
}
};
send_until('X');
while (i < n) {
send_until('Y');
send_until('Z');
}
}
#include "bits/extc++.h"
using namespace std;
template <typename T>
void dbgh(const T& t) {
cerr << t << endl;
}
template <typename T, typename... U>
void dbgh(const T& t, const U&... u) {
cerr << t << " | ";
dbgh(u...);
}
#ifdef DEBUG
#define dbg(...) \
cerr << "L" << __LINE__ << " [" << #__VA_ARGS__ << "]" \
<< ": "; \
dbgh(__VA_ARGS__)
#else
#define cerr \
if (false) \
cerr
#define dbg(...)
#endif
#define endl "\n"
#define long int64_t
#define sz(x) int(std::size(x))
void Remove(int d);
void Bruno(int n, int, vector<int> arr) {
int i = 0;
auto rm = [&](int x) -> void {
if (x != -1) {
Remove(x);
}
};
auto read_until = [&]() -> int {
while (i < n) {
if (arr[i]) {
return i++;
}
rm(i++);
}
return -1;
};
int cx = read_until();
while (i < n) {
int cy = read_until(), cz = read_until();
rm(cy);
rm(cz);
}
rm(cx);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |