mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
P3369 【模板】普通平衡树
R69516225
This commit is contained in:
parent
f20fed1f24
commit
79b18f8b78
@ -87,7 +87,6 @@ std::pair<Treap::node *, Treap::node *> Treap::splitByValue(Treap::node *p, int
|
||||
Treap::node *Treap::merge(Treap::node *x, Treap::node *y) {
|
||||
if (x == nullptr) return y;
|
||||
if (y == nullptr) return x;
|
||||
if (x->val > y->val) std::swap(x, y);
|
||||
if (x->key > y->key) {
|
||||
x->right = this->merge(x->right, y);
|
||||
x->pushup();
|
||||
|
Loading…
Reference in New Issue
Block a user