# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
242269 | oolimry | Triple Jump (JOI19_jumps) | C++14 | 1055 ms | 131136 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 a first
#define b second
#define ab first
#define value second
#define r first
#define id second
#define int long long
using namespace std;
typedef pair<int,int> ii;
const int inf = 102345678901;
const int N = 1<<19;
int arr[N];
int ans[N];
vector<ii> updates[N];
vector<ii> queries[N];
struct node{ int c, ab, abc; };
node tree[2*N];
node relax(node L, node R){
return { max(L.c, R.c), max(L.ab, R.ab), max(L.ab+R.c, max(L.abc, R.abc)) };
}
void init(){
for(int i = N;i < 2*N;i++) tree[i] = {arr[i-N], -inf, -inf};
for(int i = N-1;i >= 1;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... |