![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DP
文章平均质量分 59
naturelan
这个作者很懒,什么都没留下…
展开
-
Wikioi_1010 过河卒
http://www.wikioi.com/problem/1010/ 分析: 最先想到的是回溯,在Wikioi_1010 是680ms过的,但是在另外一个shuoj上就是TLE 然后就想起DP(2ms过)了; dp[i] [j] 存的是到达 (i,j)位置的方法数,初始化为1,对于马控制点应该是走不到的,所以设为0; 至于原创 2014-05-15 22:52:07 · 1025 阅读 · 0 评论 -
hdu1059(DP)
http://acm.hdu.edu.cn/showproblem.php?pid=1059原创 2013-10-07 00:07:45 · 783 阅读 · 0 评论 -
shu_p1234 能量项链(DP)
http://202.121.199.212/JudgeOnline/problem.php?id=1234分析: 题目意思比较清楚,类似于矩阵连乘问题,不同之处在于项链是个环,为方便计算做了稍微的处理, 即将 a[0] 到 a[n-1] 加在了原数组后面。 数据结构处理也要注意,合适的数据结构可以简化程序,代码中参考了大神的结构,觉原创 2013-11-26 21:39:35 · 1086 阅读 · 0 评论 -
shu_1243 防御导弹
http://202.121.199.212/JudgeOnline/problem.php?cid=1078&pid=6 分析:原创 2014-07-09 22:52:50 · 512 阅读 · 0 评论 -
shu_1340 vijos_1232 核电站问题
http://202.121.199.212/JudgeOnline/problem.php?cid=1078&pid=10 分析: f[ ]原创 2014-07-10 14:06:19 · 1256 阅读 · 0 评论 -
shu_p55 矩阵连乘问题
//shuoj P55 MatrixChain #include #include #include using namespace std; #define Max 24 int N; int m[Max][Max],p[Max],s[Max][Max]; void Tracebac原创 2013-11-18 15:57:48 · 1016 阅读 · 0 评论 -
shu_1572 涂色游戏
http://202.121.199.212/JudgeOnline/problem.php?cid=1076&pid=7 分析:原创 2014-07-10 15:14:36 · 729 阅读 · 0 评论 -
shu_1299 vijos 1037(搭建双塔)
http://202.121.199.212/JudgeOnline/problem.php?cid=1078&pid=7 分析: 经典DP题 dp[ i ][ j ]:前i个水晶搭建的高度差为 j 的双塔中较高塔的高度; dp[ i ][ j ] = d[ i-1 ][ j ] ,原创 2014-07-10 10:36:46 · 1115 阅读 · 0 评论