# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
308021 | adrianbudau | Triple Jump (JOI19_jumps) | C++17 | 1085 ms | 99192 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class SegmentTree {
public:
SegmentTree(const vector<int> &A): m_size(A.size()), m_data(m_size * 4) {
build(1, 1, m_size, A);
}
void update(int from, int to, int add) {
update(1, 1, m_size, from, to, add);
}
int query(int from, int to) {
return query(1, 1, m_size, from, to, 0);
}
private:
struct Node {
int max = 0;
int maxadd = 0;
int best = 0;
};
void build(int node, int begin, int end, const vector<int> &A) {
if (end - begin == 1) {
m_data[node] = Node{A[begin], 0, A[begin]};
# | 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... |