# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
555377 | sidon | Dynamic Diameter (CEOI19_diameter) | C++17 | 2117 ms | 188872 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int Z = 1e5, B = 17, INF = 1e18+1;
array<int, 2> operator+(const int &x, array<int, 2> y) {
y[0] += x;
return y;
}
struct SegmentTree {
int n, *add;
array<int, 2> *val;
int sL, sR, sV;
SegmentTree(int N) : n(2<<__lg(N-1)), add(new int[2*n] {}), val(new array<int, 2> [2*n] {}) {
for(int i = n - 1; i < 2*n; ++i) val[i][0] = -INF;
}
void assign(const int &i, const array<int, 2> &v) {
val[n+i-1] = v;
}
void build() {
for(int i = n-1; i--; ) val[i] = max(val[2*i+1], val[2*i+2]);
}
void update(int l, int r, int v) {
sL = l, sR = r + 1, sV = v;
upd(0, 0, n);
}
void upd(int x, int l, int r) {
if(sL <= l && r <= sR) {
# | 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... |