随笔分类 -  数据结构——LCT

摘要:这题和水管局长很像,枚举 $a$ 的边然后维护关于 $b$ 的最小生成树就可以了。 1A呐 _ include include using namespace std; int n, m, val[150005], zdz[150005], ans=0x3f3f3f3f, fa[150005]; i 阅读全文
posted @ 2018-05-31 08:26 poorpool 阅读(258) 评论(0) 推荐(0)
摘要:就是用 lct 维护最小生成树 "ref" cpp include include include include using namespace std; typedef pair par; int n, m, q, val[200005], zdz[200005], ans[200005], c 阅读全文
posted @ 2018-05-31 07:52 poorpool 阅读(233) 评论(0) 推荐(0)
摘要:"ref" 不是太懂…… 阅读全文
posted @ 2018-05-24 19:45 poorpool 阅读(262) 评论(0) 推荐(0)
摘要:"there" cpp include include using namespace std; int n, m, dfn[100005], idx, hea[100005], cnt, uu, vv, siz[100005], fa[100005][19]; int dep[100005], v 阅读全文
posted @ 2018-04-12 20:17 poorpool 阅读(191) 评论(0) 推荐(0)
摘要:lct裸题 cpp include include using namespace std; typedef long long ll; int n, m, uu, vv, val[100005], tagm[100005], taga[100005], sum[100005], siz[10000 阅读全文
posted @ 2018-04-11 15:39 poorpool 阅读(113) 评论(0) 推荐(0)
摘要:lct裸题 阅读全文
posted @ 2018-04-11 15:02 poorpool 阅读(117) 评论(0) 推荐(0)
摘要:参考 "there" 和 "there" "题单" cpp include include using namespace std; int n, m, val[300005], ch[300005][2], sum[300005], fa[300005], uu, vv, opt; int rev 阅读全文
posted @ 2018-04-11 11:23 poorpool 阅读(112) 评论(0) 推荐(0)