2012年7月11日

摘要: HDU3966 Aragorn's StoryTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 605Accepted Submission(s): 160Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemi 阅读全文
posted @ 2012-07-11 21:57 Fatedayt 阅读(1239) 评论(4) 推荐(0)
摘要: SPOJ 2939. Query on a tree VProblem code: QTREE5You are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are numbered from 1 to N. We define dist(a, b) as the number of edges on the path from node a to node b.Each node has a color, white or black. All the nodes are b 阅读全文
posted @ 2012-07-11 09:19 Fatedayt 阅读(781) 评论(0) 推荐(0)
摘要: SPOJ Problem Set (classical)SPOJ 1487. Query on a tree IIIProblem code: PT07JYou are given a node-labeled rooted tree withnnodes.Define the query (x,k): Find the node whose label isk-th largest in the subtree of the nodex. Assume no two nodes have the same labels.InputThe first line contains one int 阅读全文
posted @ 2012-07-11 09:14 Fatedayt 阅读(503) 评论(0) 推荐(0)

导航