
左偏树
lemonoil
竞赛党一枚
展开
-
HDU 1512 Monkey King [可并堆]
题目传送门左偏树入门题,模板题。 照板打就行了,左偏树的删除、插入都可以通过merge操作完成。#include<cstdio> #include<algorithm> using namespace std; const int maxn = 100005; struct tree { int l,r,v,dis,f; }heap[maxn]; int merge(int a,int b原创 2017-07-14 18:57:45 · 356 阅读 · 0 评论 -
BZOJ 1455 罗马游戏 [右偏树(误)][左偏树]
下面的代码是与左偏树完全相反的右偏树写法大误 其实左右互掉后没什么影响,就是把左当作右,把右当作左。(不就是一回事吗。。。。)速度好像快一点?误。。#include<cstdio> #include<cstring> #include<algorithm> using namespace std; inline void read( int &res ){ static char ch;i原创 2017-07-17 09:04:42 · 721 阅读 · 0 评论 -
BZOJ2809 dispatching [左偏树]
F.A.Qs Home Discuss ProblemSet Status Ranklist 1 Contest 入门OJ ModifyUser Sakura_LemonLogout 捐赠本站 2809:原创 2017-09-22 08:20:11 · 283 阅读 · 0 评论