# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
771449 | taitruong270 | 원숭이와 사과 나무 (IZhO12_apple) | C++17 | 445 ms | 207732 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int mxN = (int)2e5+10;
const int INF = (int)1e9+10;
int n, q, a[mxN];
struct Vertex{
int l, r, lazy, sum=0;
Vertex *le, *ri;
Vertex(int l, int r):l(l),r(r){
le=ri=nullptr; lazy=INF;
}
~Vertex(){
delete le;
delete ri;
}
void extend(){
if(!le and l!=r){
int m = (l+r)/2;
le=new Vertex(l,m);
ri=new Vertex(m+1,r);
}
}
void prop(){
if(l==r or lazy==INF) return;
int m = (l+r)/2;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |