随笔分类 - 数据结构--LCA
摘要:题意:求树上A,B两点路径上第K小的数 AT
阅读全文
摘要:A - How far away ? HDU - 2586 题意:给出一棵树,树上的边有权值,查询两个点之间的最短权值和 LCA倍增 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<
阅读全文
摘要:Nearest Common Ancestors Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34657 Accepted: 17585 Description A rooted tree is a well-known da
阅读全文