# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
191500 | oolimry | Triple Jump (JOI19_jumps) | C++14 | 1030 ms | 107272 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<long long,long long> ii;
const long long inf = 40000000003LL;
struct node{
long long c;
long long ab;
long long abc;
};
const long long N = 1 << 19; ///change to 1 << 19 upon submitting
static node tree[2*N+5];
static long long arr[N+5];
node relax(node x, node y){
node z;
z.c = max(x.c, y.c);
z.ab = max(x.ab, y.ab);
z.abc = max(x.ab + y.c, max(x.abc,y.abc));
return z;
}
void init(){
for(long long i = N;i < 2*N;i++){
tree[i] = {arr[i-N],-inf,-inf};
}
for(long long i = N-1;i > 0;i--){
tree[i] = relax(tree[i<<1],tree[i<<1|1]);
# | 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... |