# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
900782 | Isam | Foehn Phenomena (JOI17_foehn_phenomena) | C++17 | 309 ms | 21592 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>
using namespace std;
constexpr int sz = 200005;
int N, Q, S, T, A[sz];
long long sm, Temp[sz], tree[sz << 2], lazy[sz << 2];
inline void build(int l, int r, int node){
if(l == r){
tree[node] = A[l];
return;
}
int mid = l + ((r - l) >> 1);
build(l, mid, node << 1);
build(mid + 1, r, node << 1 | 1);
tree[node] = tree[node << 1] + tree[node << 1 | 1];
return;
}
inline void relax(int node, int l, int r){
if(l != r){
lazy[node << 1] += lazy[node];
lazy[node << 1 | 1] += lazy[node];
}
tree[node] += 1ll * (r - l + 1) * lazy[node];
lazy[node] = 0ll;
return;
}
inline void update(int l, int r, int node, int L, int R, int val){
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... |