摘要: 讲解: https://rpdreamer.blog.luogu.org/ci-fen-and-shu-shang-ci-fen 阅读全文
posted @ 2019-02-21 22:06 陈星卿 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 总结: 树链剖分版的LCA的dfs1稍有不同,不需要用数组记录每个点的重儿子; 树链剖分维护7个数组,树链剖分——LCA维护4个数组(fa[],dep[],size[],top[])son[]简化成heavyson_id 阅读全文
posted @ 2019-02-21 21:33 陈星卿 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #include #define read read() #define up(i,l,r) for(register int i = (l);i = (r);i--) #define traversal_vedge(i) for(register int i = head[u]; i ;i = e[i].nxt) #define ll long long using namespace st... 阅读全文
posted @ 2019-02-21 19:51 陈星卿 阅读(90) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problemnew/show/AT2442 阅读全文
posted @ 2019-02-21 16:00 陈星卿 阅读(138) 评论(0) 推荐(0) 编辑
摘要: https://loj.ac/problem/6121 BFS + 状压 写过就好想,注意细节debug 阅读全文
posted @ 2019-02-21 09:28 陈星卿 阅读(138) 评论(0) 推荐(0) 编辑