# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129526 | khanh | Foehn Phenomena (JOI17_foehn_phenomena) | C++11 | 1079 ms | 14212 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 inf 1e15 + 7
#define N 200005
#define ll long long
using namespace std;
ll n,q,up,down;
ll arr[N] , lazy[N<<2] , node[N<<2];
ll ans = 0;
void build_tree(ll i,ll l,ll r) {
if(l>r) return;
if(l==r) {
node[i] = arr[l];
return;
}
ll m = (l + r) / 2;
build_tree(i<<1 , l , m); m++;
build_tree(i<<1|1 , m , r);
}
void true_val(ll i,ll l,ll r) {
if(l!=r) {
node[i<<1] += lazy[i];
lazy[i<<1] += lazy[i];
node[i<<1|1] += lazy[i];
lazy[i<<1|1] += lazy[i];
lazy[i] = 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |