제출 #703857

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7038572023-02-28 17:32:57mihai145원숭이와 사과 나무 (IZhO12_apple)C++17
0 / 100
116 ms42160 KiB
//
// Created by mihai145 on 28.02.2023.
// Test problem: https://oj.uz/problem/view/IZhO12_apple
//
#include <iostream>
using namespace std;
const int NMAX = 4 * 100000;
class DynamicSegmentTree {
private:
int kNodes, v[4 * NMAX];
pair<int, int> sons[4 * NMAX];
bool lazy[4 * NMAX];
void init(int idx) {
sons[idx].first = ++kNodes;
sons[idx].second = ++kNodes;
}
void push(int idx, int l, int r) {
if (lazy[idx]) {
v[idx] = r - l + 1;
lazy[sons[idx].first] = true;
lazy[sons[idx].second] = true;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...