# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
853674 | Tam_theguide | Triple Jump (JOI19_jumps) | C++14 | 782 ms | 112012 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 ll INF = 1e18;
const int N = 5e5 + 5;
int n, q, a[N], l[N], r[N];
stack<int> st;
using pii = pair<int, int>;
#define fi first
#define se second
vector<pii> query_l[N];
vector<int> being_i[N];
ll tot[4*N], seg[4*N], lazy[4*N], res[N];
void build(int root, int tl, int tr) {
lazy[root] = -INF;
if (tl == tr) {
seg[root] = a[tl];
tot[root] = seg[root] + lazy[root];
return;
}
int tm = (tl + tr) / 2;
build(2*root, tl, tm);
build(2*root+1, tm+1, tr);
seg[root] = max(seg[2*root], seg[2*root+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... |