![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
区间dp
mumei314
这个作者很懒,什么都没留下…
展开
-
区间dp入门——总结+习题+解析
前天学长拉了个区间dp的专题,花了两个做,今天就来做个总结吧!!!区间dp其实就是一种建立在线性结构上的对区间的动态规划,dp本来就是很奇妙的东西,也没有什么套路,就是一种思考的数学思维方式,只有做足够多的题并且想的足够多才可能在比赛中做出来。区间dp,顾名思义,在区间上dp,大多数题目的状态都是由区间(类似于dp[l][r]这种形式)构成的,就是我们可以把大区间转化成小区间来处理,然后对...原创 2019-08-03 15:25:01 · 11529 阅读 · 2 评论 -
杭电多校第六场E题——区间dp
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6831题意:给你一个无限长的字符串"114514191911451419191145141919...",然后对于这个字符串的任意一个前缀,我们可以在中间插入(),*和+,让你求出能够凑出n的最小的字符串的长度。题解:定义状态dp[l][r][val]表示[l,r]区间能否凑出val状态转移方程:dp[l][r][p+k]=dp[l][m][p]&dp[m+1][r][k];dp.原创 2020-09-19 13:08:08 · 147 阅读 · 0 评论 -
zoj3537——最优三角剖分+凸包
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3537You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped par...原创 2019-08-03 11:16:48 · 566 阅读 · 0 评论 -
Lightoj1422——区间dp经典题
题目链接:http://lightoj.com/volume_showproblem.php?problem=1422题目翻译:盖普有一个非常繁忙的周末在他面前。因为,下周末是万圣节,他计划参加尽可能多的聚会。由于是万圣节,这些派对都是服装派对,Gappu总是选择他的服装,这样它与他...原创 2019-08-03 13:20:47 · 544 阅读 · 0 评论 -
poj2955——括号匹配+区间dp经典题
题目链接:http://poj.org/problem?id=2955We give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence, if s is a regular brackets sequen...原创 2019-08-03 11:55:32 · 544 阅读 · 0 评论 -
codeforce-149D——括号匹配染色+区间dp
题目链接:http://codeforces.com/problemset/problem/149/DOnce Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it.You are given stri...原创 2019-08-03 12:47:01 · 1058 阅读 · 0 评论 -
poj1651——最优矩阵链乘
题目链接:http://poj.org/problem?id=1651The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores...原创 2019-08-03 12:58:58 · 315 阅读 · 0 评论 -
zoj3469——区间dp好题
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3469When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this ...原创 2019-08-03 13:10:41 · 512 阅读 · 0 评论 -
hdu4283——经典区间dp
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4283都知道cry非常喜欢和小姐姐一起"玩耍",每个小姐姐他都要花一定的时间和她们玩耍,但是玩耍时要到隐蔽的地方去,因此他每次只能选择一个小姐姐,而让其他小姐姐耐心等待。这一天他约了一大堆的小姐姐数了数竟然有n个漂亮小姐姐,n个小姐姐排成一排依次和cry一起玩耍,每个小姐姐们都有一个"耐心值...原创 2019-08-03 13:19:09 · 524 阅读 · 0 评论 -
hdu2476——经典区间dp
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2476There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the h...原创 2019-08-03 13:30:37 · 495 阅读 · 0 评论