摘要:
讲解: https://rpdreamer.blog.luogu.org/ci-fen-and-shu-shang-ci-fen 阅读全文
摘要:
总结: 树链剖分版的LCA的dfs1稍有不同,不需要用数组记录每个点的重儿子; 树链剖分维护7个数组,树链剖分——LCA维护4个数组(fa[],dep[],size[],top[])son[]简化成heavyson_id 阅读全文
摘要:
#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... 阅读全文
摘要:
https://www.luogu.org/problemnew/show/AT2442 阅读全文
摘要:
https://loj.ac/problem/6121 BFS + 状压 写过就好想,注意细节debug 阅读全文