HDU5534--Partial Tree (完全背包)
摘要:
点击打开链接 思路:总度数为2n-2,由于每个节点都至少要有1个度,所以可以看做把剩余n-2个点放入n个节点的背包问题。dp[i]表示放入i个度后的最大值 阅读全文
posted @ 2016-07-14 16:58 polarday 阅读(131) 评论(0) 推荐(0) 编辑
posted @ 2016-07-14 16:58 polarday 阅读(131) 评论(0) 推荐(0) 编辑
posted @ 2016-07-14 13:43 polarday 阅读(123) 评论(0) 推荐(0) 编辑