# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
201466 | maruii | Triple Jump (JOI19_jumps) | C++14 | 993 ms | 88056 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 pii = pair<int, int>;
#define ff first
#define ss second
int A[500005], N, Q, stk[500005], stn;
const int SIZE = 1 << 19;
struct ST {
struct Node {
unsigned a, b, v;
} X[2 * SIZE];
void init(int nn, int s, int e) {
if (s == e) {
X[nn].a = A[s];
return;
}
int m = s + e >> 1;
init(nn << 1, s, m);
init(nn << 1 | 1, m + 1, e);
X[nn].a = max(X[nn << 1].a, X[nn << 1 | 1].a);
}
void busy(int nn) {
if (X[nn << 1].b < X[nn].b) {
X[nn << 1].b = X[nn].b;
X[nn << 1].v = max(X[nn << 1].v, X[nn << 1].a + X[nn].b);
}
if (X[nn << 1 | 1].b < X[nn].b) {
X[nn << 1 | 1].b = X[nn].b;
X[nn << 1 | 1].v = max(X[nn << 1 | 1].v, X[nn << 1 | 1].a + X[nn].b);
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... |