# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
681626 | stevancv | Progression (NOI20_progression) | C++14 | 1714 ms | 125724 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 ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
using namespace std;
const int N = 3e5 + 2;
const ll linf = 9e18;
struct Segtree {
ll st[4 * N], lzys[4 * N], lzya[4 * N];
void Reset1(int n) {
for (int i = 1; i <= 4 * n; i++) {
lzys[i] = linf;
st[i] = lzya[i] = 0;
}
}
void Propagate1(int node, int l, int r) {
if (lzys[node] == linf && lzya[node] == 0) return;
if (l < r) {
if (lzys[node] != linf) {
lzys[2 * node] = lzys[2 * node + 1] = lzys[node];
lzya[2 * node] = lzya[2 * node + 1] = 0;
}
if (lzya[node] != 0) {
if (lzys[2 * node] != linf) lzys[2 * node] += lzya[node];
else lzya[2 * node] += lzya[node];
if (lzys[2 * node + 1] != linf) lzys[2 * node + 1] += lzya[node];
else lzya[2 * node + 1] += lzya[node];
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... |