# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
635177 | phathnv | 송신탑 (IOI22_towers) | C++17 | 1516 ms | 96224 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
struct Node {
Node* nLeft;
Node* nRight;
int l, r, sum, minPos, maxPos, minVal;
Node(int _l, int _r, int val) {
nLeft = nRight = nullptr;
l = _l;
r = _r;
sum = 0;
minPos = 1e9;
maxPos = -1e9;
minVal = val;
assert(l <= r);
}
};
Node* mergeNode(Node* a, Node* b) {
assert(a->r + 1 == b->l);
Node* res = new Node(a->l, b->r, 1e9);
res->nLeft = a;
res->nRight = b;
res->sum = a->sum + b->sum;
res->minPos = min(a->minPos, b->minPos);
res->maxPos = max(a->maxPos, b->maxPos);
res->minVal = min(a->minVal, a->minVal);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |