# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
945244 | TAhmed33 | 무지개나라 (APIO17_rainbow) | C++98 | 895 ms | 229856 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "rainbow.h"
using namespace std;
const int MAXN = 5e6 + 25;
#define mid ((l + r) >> 1)
struct PersistentSegmentTree {
set <pair <int, int>> points;
const int L = 200000;
int tree[MAXN], tl[MAXN], tr[MAXN], cnt;
vector <pair <int, int>> roots;
int new_node (int x, int y, int z) {
++cnt; assert(cnt < MAXN); tl[cnt] = x; tr[cnt] = y;
tree[cnt] = z;
return cnt;
}
int build (int l, int r) {
if (l == r) {
cnt++; assert(cnt < MAXN);
return cnt;
}
int left = build(l, mid), right = build(mid + 1, r);
return new_node(left, right, 0);
}
int update (int l, int r, int a, int b, int node) {
if (l == r) {
int x = tree[node]; x += b;
cnt++; assert(cnt < MAXN);
tree[cnt] = x; return cnt;
}
if (a <= mid) {
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |