# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
27092 | tlwpdus | Editor (BOI15_edi) | C++98 | 896 ms | 399308 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n;
struct node {
node *l, *r;
int val;
node() {val = 0; l = r = NULL;}
node(int v):val(v){l = r = NULL;}
void init(int s = 0, int e = n) {
if (s==e) return;
int m = (s+e)>>1;
if (!l) l = new node();
if (!r) r = new node();
l->init(s,m); r->init(m+1,e);
val = max(l->val,r->val);
}
int getv(int S, int E, int s = 0, int e = n) {
if (e<S||E<s) return 0;
if (S<=s&&e<=E) return val;
int m = (s+e)>>1;
return max(l->getv(S,E,s,m),r->getv(S,E,m+1,e));
}
node* upd(int idx, int val, node *ori, int s = 0, int e = n) {
if (e<idx||idx<s) return ori;
if (s==e) return new node(val);
int m = (s+e)>>1;
if (!l) l = new node();
컴파일 시 표준 에러 (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... |