# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
536254 | Tadiorn | Foehn Phenomena (JOI17_foehn_phenomena) | C++14 | 0 ms | 0 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 fi first
#define se second
#define ll long long
#define pii pair<int,int>
#define pll pair<long long,long long>
#define INF 1000000000
#define LINF 1000000000000000000
#define pb push_back
using namespace std;
#define MAXN 200010
ll a[MAXN];
ll seg[4*MAXN];
ll lazy[4*MAXN];
void propagate(int node, int l, int r){
if(l == r){
seg[node] += lazy[node];
lazy[node] = 0;
return;
}
lazy[2*node] += lazy[node]; lazy[2*node+1] += lazy[node];
lazy[node] = 0;
return;
}
void update(int node, int l, int r, int L, int R, ll x){
//cout << "START " << node << ", " << l << ", " << r << endl;
propagate(node, l, r);
if(L <= l && r <= R){