# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
242269 | oolimry | 3단 점프 (JOI19_jumps) | C++14 | 1055 ms | 131136 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define a first
#define b second
#define ab first
#define value second
#define r first
#define id second
#define int long long
using namespace std;
typedef pair<int,int> ii;
const int inf = 102345678901;
const int N = 1<<19;
int arr[N];
int ans[N];
vector<ii> updates[N];
vector<ii> queries[N];
struct node{ int c, ab, abc; };
node tree[2*N];
node relax(node L, node R){
return { max(L.c, R.c), max(L.ab, R.ab), max(L.ab+R.c, max(L.abc, R.abc)) };
}
void init(){
for(int i = N;i < 2*N;i++) tree[i] = {arr[i-N], -inf, -inf};
for(int i = N-1;i >= 1;i--) tree[i] = relax(tree[i<<1], tree[i<<1|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... |