区间/树形/状压DP
刀锋灬意志
嘤嘤嗡嗡
展开
-
HDU3506-Monkey Party(区间DP 石子合并 四边形不等式优化)
题目链接Problem DescriptionFar away from our world, there is a banana forest. And many lovely monkeys live there. One day, SDH(Song Da Hou), who is the king of banana forest, decides to hold a big par...原创 2019-08-19 13:58:03 · 183 阅读 · 0 评论 -
HDU1520-Anniversary party(树形DP 入门)
题目链接Problem DescriptionThere 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 means that the sup...原创 2019-08-19 14:48:40 · 125 阅读 · 0 评论 -
POJ2955-Brackets(区间dp 括号匹配)
题目链接We give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regula...原创 2019-08-16 22:50:54 · 141 阅读 · 0 评论 -
HDU4283-You Are the One(区间dp 模拟栈)
题目链接Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Smal...原创 2019-08-16 23:56:17 · 338 阅读 · 0 评论 -
HDU1561-The more, The Better(树形DP 树形依赖背包)
题目链接Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗?Input每个测试实例首先包括2个整数,N,M.(1...原创 2019-08-22 23:21:27 · 150 阅读 · 0 评论 -
POJ2411-Mondriaan's Dream(轮廓线DP)
题目链接题意用2*1的骨牌填充满m*n的矩阵,问有多少种不同的填法。思路有、没有用1、0表示,状压DP的思想,但是区别是用的是2*1的骨牌,填一行后可能会有不填的情况,所以轮廓线DP(或插头DP)就是解决这种每次一行不是整个的问题。记录的状态,不是一整行的状态,而可能是一个斜着的状态,状态的第一个位置并不一定对应着每行的第一个位置。轮廓线DP详解:https://blog.cs...原创 2019-09-22 10:24:08 · 155 阅读 · 0 评论