Results 12 comments of llleixx

而且删除任意结点应该专门写一个函数 `del` ,在里面维护一下 `merge` 后的“根”结点的父亲。

> ref: https://en.wikipedia.org/wiki/Leftist_tree#Deletion_of_an_arbitrary_element_from_a_Min_HBLT > > > **[Leftist tree - Wikipedia](https://en.wikipedia.org/wiki/Leftist_tree#Deletion_of_an_arbitrary_element_from_a_Min_HBLT)** 咦,学长。 这样写 `pushup` 不会有问题吗,递归到最底层,最底层又开始向上递归 `pushup`,但此时 `rs(x) = merge(rs(x), y)` 还没有执行,也就是说,上面的结点的右儿子还没有更新,当当层的 `pushup` 结束完后,才会正确更新上层的右儿子。也就是说会出现错误更新的情况,复杂度也不能保证。 应该写个 `del` 函数,在 `del` 函数中调用可以维护子孙结点的 `merge` 函数,然后再调用 `pushup`...

新版本应该没有这个 bug 了。 但控制台报错仍然存在,这个原因是 iframe 还没有 load 就发起了 postMessage。之后有时间我会 PR 一下。

@JiZiQian 你最后一次提交格式仍是错误的 ![image](https://github.com/OI-wiki/OI-wiki/assets/75014336/e376aae7-0884-4d5f-a58c-0127d410b540) --- 复杂度证明: 复杂度分为两部分:一部分 `merge` 递归,前面已证;另一部分 `pushup` 递归(也就是原文档的证明),但那块证明的前提是代替删除节点位置的新节点的 `dist` 最多减少 $1$,如此才能保证只有文中提及的两种情况存在。 `dist` 至多减少 $1$:考虑 `merge` 过程,每次都会使 $x$ 或 $y$ 向下一层,也就是说最极端的情况,就是一直选择左偏树的右节点(dist 最小的结点)向下一层,此时 `dist` 减少 $1$。

> > Hi everyone really sorry for this issue. Indeed toggling the setting above mentioned by [@tamuratak](https://github.com/tamuratak) should fix your issue. I would like to investigate this however and would...

> Hopefully this makes for a better IME experience as users will not need to change to insert mode to input Chinese. No, it's actually desirable to switch to insert...

Seems like it’s been fixed in VSCode 1.102.0.

> expect is `test 如果input`, acture is `test v如果nput`, first letter `v` is executed as vim command. No, the letter `v` was simply inserted into the text, and the letter...