@[_SunLight_](/user/713562)
`merge` 那里。
左偏树的定义是 **左儿子 dis 值不小于右儿子 dis 值**,你写反了。
然后交换是 `swap(tree[x].ls,tree[x].rs)`。
更新 dis 也更新错了。
`tree[x].dis=tree[tree[x].rs].dis+1`。
这么晚了还在卷 %%%
by Wind_Leaves_ShaDow @ 2024-02-19 22:09:20