0
1
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:
Baoshuo Ren 2022-02-17 08:38:27 +08:00
parent f20fed1f24
commit 79b18f8b78
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();