摘要:
题目链接:http://poj.org/problem?id=1655Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6769Accepted: 2718DescriptionConsider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a 阅读全文
摘要:
题目链接:http://poj.org/problem?id=1564DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1, 1], then there are four different sums that equal 4: 4, 3+1, 2+2, and 2 阅读全文