随笔分类 -  树形dp

摘要:Description In the battlefield , an effective way to defeat enemies is to break their communication system. The information department told you that there are n... 阅读全文
posted @ 2016-04-09 20:23 ZhMZ 阅读(223) 评论(0) 推荐(0)
摘要:Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It mea... 阅读全文
posted @ 2016-04-06 19:32 ZhMZ 阅读(170) 评论(0) 推荐(0)
摘要:Description ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input... 阅读全文
posted @ 2016-04-06 18:55 ZhMZ 阅读(190) 评论(0) 推荐(0)
摘要:Description Bob wants to hold a race to encourage people to do sports. He has got trouble in choosing the route. There are N houses and N - 1 roads in his village. Each r... 阅读全文
posted @ 2016-04-06 17:16 ZhMZ 阅读(135) 评论(0) 推荐(0)