MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / update

Method update

code/data-structures/segment_tree_node.cpp:10–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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; } };

Callers 1

update_costMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected