随笔分类 - 图论-树链剖分-LCA
摘要:QTREE4 cpp pragma comment(linker, "/STACK:102400000,102400000") // include include include include include include include include include define fi f
阅读全文
摘要:[TOC] LCA模板 cpp include define lowbit(x) (x&( (x))) define lson rtdfsid//dfsid id//lastid void init(){ tot= 1;inde=0; mme(head, 1);mme(son, 1); mme(sz
阅读全文
摘要:``` include include include include include include include define fi first define se second using namespace std; typedef long long LL; typedef pair p
阅读全文
摘要:(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 Catalog [TOC] Problem: "Portal传送门" 原题目描述在最下面。 求链上第k小点权。 Solution: 普通的主席树中,第$i$个主席树保存的是区间$[1,i]$的值域情况。 &emsp
阅读全文
摘要:(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 题目:传送门 (原题目描述及样例在最下面。) 思路: 有问题私聊问。
阅读全文