最小生成树
SAuppp
这个作者很懒,什么都没留下…
展开
-
bzoj2594
lct维护最小生成树裸题(神tm加强版 按照原版写的一直t 原来数组开小了=.=#include #include using namespace std;int ch[1500005][2],fa[1500005],rv[1500005],x[1500005],ans[1500005],ans_o[1500005];int cnt,ccnt;int st[15原创 2016-03-02 10:42:48 · 293 阅读 · 0 评论 -
bzoj3669
一维排序 另一维lct维护最小生成树#include #include #include using namespace std;int ch[150010][2],rv[150010],fa[150010],st[150010],tp;int ma[150010],x[150010],nu[150010],mn[150010];int n,m;int head[50原创 2016-03-08 09:36:33 · 216 阅读 · 0 评论 -
bzoj1083
辣鸡题 裸最小生成树#include #include using namespace std;int n,m,head[310];struct edge { int u,v,w; bool operator < (const edge &b)const { return w < b.w; }}e[90010];int read_int () { char原创 2016-03-08 15:27:28 · 346 阅读 · 0 评论