# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
27091 | khsoo01 | Editor (BOI15_edi) | C++11 | 683 ms | 211872 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int N = 300005;
int n, a[N];
struct node {
int v; node *lc, *rc;
node () {v=0; lc=NULL; rc=NULL;}
void init (int L=0, int R=n) {
if(L == R) return;
int M = (L+R)/2;
lc = new node(); lc->init(L, M);
rc = new node(); rc->init(M+1, R);
}
void upd (node *Q, int P, int V, int L=0, int R=n) {
if(L == R) {v = max(Q->v, V); return;}
int M = (L+R)/2;
if(P <= M) {
rc = Q->rc; lc = new node();
lc->upd(Q->lc, P, V, L, M);
}
else {
lc = Q->lc; rc = new node();
rc->upd(Q->rc, P, V, M+1, R);
}
v = max(lc->v, rc->v);
}
int get (int S, int E, int L=0, int R=n) {
if(S <= L && R <= E) return v;
컴파일 시 표준 에러 (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... |