求调。线段树合并,手写双向链表。
这是代码(带注释):
https://www.luogu.com.cn/paste/ulhth0c2
这是提交记录:
https://www.luogu.com.cn/record/172265891
先别管 T 的。主要想解决 WA 的两个点。