# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
140195 | arman_ferdous | Triple Jump (JOI19_jumps) | C++11 | 1397 ms | 134264 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;
using ll = long long;
const int N = 5e5+10;
const ll oo = 1e18;
int n;
ll a[N];
deque<pair<int,int>>q;
vector<pair<int,int>> rel;
struct data{
ll ab, c, sum;
data(ll x = -oo,ll y = -oo, ll z = -oo) {
ab = x, c = y, sum = z;
}
}t[N<<2];
data merge(data L, data R) {
return data({max(L.ab, R.ab), max(L.c, R.c), max({L.sum, R.sum, L.ab + R.c})});
}
void updAB(int node, int L, int R, int pos, ll x) {
if(L == R) {
t[node].ab = max(t[node].ab, x);
t[node].sum = t[node].ab + t[node].c;
return;
} int mid = (L + R) >> 1, lc = node << 1, rc = lc | 1;
if(pos <= mid) updAB(lc, L, mid, pos, x);
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... |