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 评论