摘要: "题目描述" 思路 树链剖分更新子树x,由于线段树节点的顺序由dfs产生,所以更新的线段树区间为[dfn[x], dfn[x] + size[x] 1] 代码 c++ include include define lc k '9') { if (ch == ' ') f = 1; ch = getc 阅读全文
posted @ 2019-09-15 21:53 cabbage-leaf 阅读(201) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 树链剖分模板 代码 c++ include include define lc k (b) ? a : b) define FOR(a, b) for(int i=a;i '9') { if (ch == ' ') f = 1; ch = getchar(); } while ( 阅读全文
posted @ 2019-09-15 10:55 cabbage-leaf 阅读(244) 评论(0) 推荐(0) 编辑