0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-09-19 21:45:25 +00:00

#104. 普通平衡树

https://loj.ac/s/1383117
This commit is contained in:
Baoshuo Ren 2022-02-17 08:33:01 +08:00
parent a0dbc85ede
commit f20fed1f24
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -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();