随笔分类 -  动态规划-区间DP

摘要:算法背景: 有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子合并为1堆。在合并的过程中只能每次将相邻的两堆石子合并,每次合并的花费为这两堆石子之和,求合并成1堆的最小花费。 dp[i][j]表示将区间[i, j]合并成1堆的最小代价。 阅读全文
posted @ 2018-11-16 16:29 真想不出名字了 阅读(158) 评论(0) 推荐(0)
摘要:In Chinese mythology, Pangu is the first living being and the creator of the sky and the earth. He woke up from an egg and split the egg into two part 阅读全文
posted @ 2018-11-15 11:23 真想不出名字了 阅读(374) 评论(0) 推荐(0)