# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400082 | keta_tsimakuridze | Triple Jump (JOI19_jumps) | C++14 | 1915 ms | 114916 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 f first
#define int long long
#define s second
using namespace std;
const int N=5e5+5,mod=1e9+7;
int t,a[N],L[N],R[N],lazy[4*N],ans[N],n,F;
pair<int,int> tree[4*N];
vector<int>V[N];
vector<pair<int,int> > q[N];
void update(int u,int start,int end,int l,int r,int val,int f) {
if(lazy[u]){
tree[u].s = max(tree[u].s,tree[u].f + lazy[u]);
if(l!=r){
lazy[2*u]=max(lazy[2*u],lazy[u]);
lazy[2*u+1]=max(lazy[2*u+1],lazy[u]);
}
lazy[u] = 0;
}
if(l>end || r<start) return;
if(start<=l && r<=end) {
if(f == 0) tree[u].f = val,tree[u].s = val;
else {
lazy[u] = val;
tree[u].s = max(tree[u].s,tree[u].f + lazy[u]);
if(l!=r){
lazy[2*u]=max(lazy[2*u],lazy[u]);
lazy[2*u+1]=max(lazy[2*u+1],lazy[u]);
}
lazy[u] = 0;
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... |