随笔分类 -  数据结构——并查集

摘要:神tm st表+并查集 cpp include include include using namespace std; typedef long long ll; int n, m, a, b, c, d, fa[19][100005]; const int mod=1000000007; int 阅读全文
posted @ 2018-04-17 20:54 poorpool 阅读(183) 评论(0) 推荐(0)
摘要:边带权比较好做,然后dp方案 cpp include include include include include using namespace std; int n, pu, pv, uu, vv, fa[605], gx[605], cnt, bel1[605], bel2[605], dp 阅读全文
posted @ 2018-03-02 17:47 poorpool 阅读(137) 评论(0) 推荐(0)
摘要:"参考" 阅读全文
posted @ 2018-03-01 17:22 poorpool 阅读(167) 评论(0) 推荐(0)
摘要:参见算法竞赛进阶指南190页 cpp include include include using namespace std; int n, m, num[10005], qwq=1, fa[10005], dis[10005]; char ss[15]; struct Node{ int l, r 阅读全文
posted @ 2018-02-21 21:09 poorpool 阅读(142) 评论(0) 推荐(0)