# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
202861 | Mercenary | Triple Jump (JOI19_jumps) | C++14 | 1415 ms | 85396 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 taskname "A"
#define pb push_back
#define mp make_pair
using namespace std;
const int maxn = 5e5 + 6;
typedef pair<int,int> ii;
typedef long long ll;
typedef long double ld;
struct node{
int lz , s , res;
}s[maxn * 4];
int n , a[maxn];
void push(int x , bool key){
s[x].res = max(s[x].res,s[x].s+s[x].lz);
if(key){
s[x * 2].lz= max(s[x * 2].lz , s[x].lz);
s[x * 2 + 1].lz = max(s[x * 2 + 1].lz , s[x].lz);
}
}
void build(int x , int l , int r){
s[x].lz = -1e9;
if(l == r){
s[x].s = a[l];
return;
}
int mid = l + r >> 1;
build(x*2,l,mid);build(x*2+1,mid+1,r);
s[x].s = max(s[x*2].s,s[x*2+1].s);
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... |