![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树形DP
qq_37383726
这个作者很懒,什么都没留下…
展开
-
【POJ - 1655】Balancing Act 【树形DP 求解树的重心】
Consider 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 node to be the size of the la原创 2017-10-15 00:33:21 · 317 阅读 · 0 评论 -
【CodeForces 686 D. 】 【树的重心性质】
D. Kay and Snowflake time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output After the piece of a devilish mirror hit the Kay’s eye, he is no原创 2017-10-15 21:26:51 · 604 阅读 · 0 评论 -
【POJ 3107 】Godfather 【树的重心】
Language: Godfather Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7652 Accepted: 2701 DescriptionLast years Chicago was full of gangster fights and strange murders. The chief原创 2017-10-15 10:00:13 · 256 阅读 · 0 评论 -
[HDU - 1561 ] The more, The Better [树上依赖背包的思考]
ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗?Input每个测试实例首先包括2个整数,N,M.(1 &amp;lt;= M &amp;lt;= N &amp;lt;= 200);在...原创 2018-10-09 19:27:28 · 205 阅读 · 0 评论