# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
132498 | tlwpdus | Cat in a tree (BOI17_catinatree) | C++11 | 139 ms | 19140 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n, d;
vector<int> lis[200100];
int st[200100], en[200100], par[200100], dep[200100];
int tree[530000];
const int key = 262144;
void init() {
for (int i=0;i<key*2;i++) tree[i] = INF;
}
void upd(int s, int e, int val) {
s += key; e += key;
while(s<=e) {
if (s&1) tree[s] = min(tree[s],val);
if (~e&1)tree[e] = min(tree[e],val);
s = (s+1)/2;
e = (e-1)/2;
}
}
int getv(int idx) {
int ans = INF;
idx+=key;
while(idx) {
ans = min(ans,tree[idx]);
idx/=2;
컴파일 시 표준 에러 (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... |