# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
242524 | dantoh000 | Triple Jump (JOI19_jumps) | C++14 | 1293 ms | 125048 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;
typedef pair<int,int> ii;
typedef tuple<int,int,int> iii;
int n,q;
int a[500005];
int ans[500005];
vector<ii> good[500005];
vector<ii> query[500005];
struct node{
int s,e,m,ab,c,abc;
node *l, *r;
node (int _s, int _e) : s(_s), e(_e){
m = (s+e)/2;
ab = c = abc = 0;
if (s != e){
l = new node(s,m);
r = new node(m+1,e);
ab = max(l->ab,r->ab);
c = max(l->c,r->c);
abc = max(l->ab+r->c,max(l->abc,r->abc));
}
else{
c = a[s];
}
}
void up(int x, int nv){
if (s == e){
ab = max(ab,nv);
abc = ab+c;
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... |