# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
93463 | mirbek01 | 원숭이와 사과 나무 (IZhO12_apple) | C++11 | 576 ms | 159736 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+5;
vector <int> ans;
struct st
{
int l , r , val;
bool add;
st()
{
l = r = val = add = 0;
}
}tree[N * 100];
int cnt = 1;
void push( int v , int tl , int tr )
{
if(tl != tr){
if(!tree[v].l) tree[v].l = ++ cnt;
if(!tree[v].r) tree[v].r = ++ cnt;
}
if(tree[v].add){
if(tl != tr){
tree[ tree[v].l ].add = tree[ tree[v].r ].add = 1;
}
tree[v].val = tr - tl + 1;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |