# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163933 | maruii | Triple Jump (JOI19_jumps) | C++14 | 1002 ms | 77324 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
const int SIZE = 1 << 15;
struct ST {
int A[2 * SIZE];
void update(int x, int v) {
for (x += SIZE; x; x >>= 1) A[x] = max(A[x], v);
}
int query(int s, int e) {
int ret = 0;
for (s += SIZE, e += SIZE; s <= e; s >>= 1, e >>= 1) {
if ( s & 1) ret = max(ret, A[s++]);
if (~e & 1) ret = max(ret, A[e--]);
}
return ret;
}
} seg;
int A[5005], X[5005][5005];
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
int N; cin >> N;
if (N > 5000) assert(0);
for (int i = 1; i <= N; ++i) cin >> A[i], seg.update(i, A[i]);
# | 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... |