# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
308021 | adrianbudau | 3단 점프 (JOI19_jumps) | C++17 | 1085 ms | 99192 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |