2012年9月21日

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) 编辑

POJ 1330 Nearest Common Ancestors (LCA入门题)

摘要: Nearest Common AncestorsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 12478Accepted: 6652DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 . 阅读全文

posted @ 2012-09-21 19:07 kuangbin 阅读(1388) 评论(0) 推荐(0) 编辑

HDU 3183 A Magic Lamp (双向链表贪心删除 或者是 RMQ取数)

摘要: A Magic LampTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 745Accepted Submission(s): 271Problem DescriptionKiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and 阅读全文

posted @ 2012-09-21 12:36 kuangbin 阅读(590) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: