cychester

2018年9月21日

Luogu 2173 [ZJOI2012]网络 - LCT

摘要: Solution $LCT$ 直接上$QuQ$ 注意$cut$ 完 需要 $d[u + c * N]--$ 再 $link$, 不然会输出Error 1的哦 Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #de 阅读全文

posted @ 2018-09-21 21:50 cychester 阅读(146) 评论(0) 推荐(0) 编辑

Luogu 2147 洞穴勘测 - LCT

摘要: Solution $LCT$ 打上 $cut$ , $link$ 和 $finroot$ 即可 Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #define rd read() 5 using namespac 阅读全文

posted @ 2018-09-21 12:29 cychester 阅读(132) 评论(0) 推荐(0) 编辑

Luogu1501 Tree II - LCT

摘要: Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #define rd read() 5 #define ll long long 6 using namespace std; 7 8 const int N = 阅读全文

posted @ 2018-09-21 11:29 cychester 阅读(89) 评论(0) 推荐(0) 编辑

BZOJ 2002 [HNOI2010]Bounce 弹飞绵羊 - LCT

摘要: Solution 只需要支持$access$ , $cut$ 和 $link$就可以了。 注意不要$makeroot$。 查询时查询 根节点的左子树大小 $+ 1$ Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 阅读全文

posted @ 2018-09-21 10:25 cychester 阅读(109) 评论(0) 推荐(0) 编辑

导航