POJ 1470 Closest Common Ancestors (LCA入门题)
摘要:
Closest Common AncestorsTime Limit: 2000MSMemory Limit: 10000KTotal Submissions: 11659Accepted: 3848DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest 阅读全文
posted @ 2012-09-21 19:08 kuangbin 阅读(609) 评论(0) 推荐(0) 编辑