# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
261324 | Nightlight | Progression (NOI20_progression) | C++14 | 1752 ms | 69368 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define L(n) (n << 1)
#define R(n) (n << 1 | 1)
using namespace std;
const long long INF = 2e18;
//segtree nyimpen selisih antara D[i] dan D[i + 1]
struct node {
int best;
long long l, r, sum;
int r_sz, l_sz;
};
int N, Q;
int D[300005];
node tree[1200005];
long long lazy1[1200005];//nambah
long long lazy2[1200005];//ubah
inline void merge(node &now, node le, node ri) {
now.best = max(le.best, ri.best);
now.sum = le.sum + ri.sum;
if(le.l_sz == -1 && ri.l_sz == -1) {
if(le.r == ri.r) {
now.r = le.r;
now.r_sz = le.r_sz + ri.r_sz;
now.l_sz = -1;
}else {
now.l = le.r;
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |