配对堆是一种可并堆
题意:两种操作,合并两个堆或者查询一个堆的最小值, n ≤ 1 0 6 n\leq 10^6 n≤106
P a i r i n g − H e a p Pairing-Heap Pairing−Heap还挺好写的,不过并没有传说中那么快
这里没有 D e c r e a s e − K e y Decrease-Key Decrease−Key的代码,说一下大概怎么实现
额外记录一个 F a t h e r Father Father域,执行 D e c r e a s e − K e y Decrease-Key Decrease−
配对堆模板
最新推荐文章于 2023-08-15 11:23:40 发布