| 8 | node(int _l, int _r, ll _x) : node(_l,_r) { x = _x; } |
| 9 | node(node a, node b) : node(a.l,b.r) { x = a.x + b.x; } |
| 10 | void update(ll v) { x = v; } |
| 11 | void range_update(ll v) { lazy = v; } |
| 12 | void apply() { x += lazy * (r - l + 1); lazy = 0; } |
| 13 | void push(node &u) { u.lazy += lazy; } }; |