摘要:
1,边双联通(桥) POJ3177Redundant Paths Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17989 Accepted: 7470 Description In order to get from one 阅读全文
摘要:
Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 8841 Accepted: 3854 Special Judge Description Bessie's been appointed the new watc 阅读全文
摘要:
HDU 2586 题意:一棵树,多次询问任意两点的路径长度。 LCA:最近公共祖先Least Common Ancestors。两个节点向根爬,第一个碰在一起的结点。 求出x, y的最近公共祖先lca后,假设dist[x]为x到根的距离,那么x->y的距离为dist[x]+dist[y]-2*dis 阅读全文