# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
787014 | ToniB | 밀림 점프 (APIO21_jumps) | C++17 | 1227 ms | 64736 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "jumps.h"
#define X first
#define Y second
using namespace std;
const int MAXN = 2e5 + 2;
const int LOG = 18;
const int OFF = 1 << LOG + 1;
int n, nxt[MAXN][LOG], prv[MAXN], prv_max[MAXN][LOG];
int jump[MAXN][LOG], max_reachable[MAXN][LOG];
pair<int, int> tour[OFF];
vector<int> h;
pair<int, int> f(int x, int l, int r, int ql, int qr){
if(ql > r || l > qr) return {-1, -1};
if(ql <= l && r <= qr) return tour[x];
int mid = (l + r) >> 1;
pair<int, int> L = f(x * 2 + 1, l, mid, ql, qr);
pair<int, int> R = f(x * 2 + 2, mid + 1, r, ql, qr);
return max(L, R);
}
void con(int x, int l, int r){
if(l == r){
tour[x] = {h[l], l};
return ;
}
int mid = (l + r) >> 1;
con(x * 2 + 1, l, mid);
con(x * 2 + 2, mid + 1, r);
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |