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

Function augment

code/data-structures/cartesian_tree.cpp:7–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5 : x(_x), y(_y), sz(1), l(NULL), r(NULL) { } };
6int tsize(node* t) { return t ? t->sz : 0; }
7void augment(node *t) {
8 t->sz = 1 + tsize(t->l) + tsize(t->r); }
9pair<node*,node*> split(node *t, int x) {
10 if (!t) return make_pair((node*)NULL,(node*)NULL);
11 if (t->x < x) {

Callers 6

fixMethod · 0.85
splitFunction · 0.85
mergeFunction · 0.85
eraseFunction · 0.85
augmentMethod · 0.85
max_flowMethod · 0.85

Calls 1

tsizeFunction · 0.85

Tested by

no test coverage detected