mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-30 15:56:27 +00:00
parent
a0dbc85ede
commit
f20fed1f24
@ -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