51nod p1007 将一堆正整数分为2组,要求2组的和相差最小。 例如:1 2 3 4 5,将1 2 4分为1组,3 5分为1组,两组和相差1,是所有方案中相差最少的。
分类:动态规划
【概率DP】Just another Robbery
As Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything qui…
Making the Grade DP
Description A straight dirt road connects two fields on FJ‘s farm, but it changes elevation more than FJ would…
【区间DP】Brackets
传送门:Brackets 题意:()与[ ]括号匹配,求有效匹配个数。 解法:简单区间DP
【贪心+01背包】The Highest Mark
传送门:【HDU5501】The Highest Mark 分析:贪心+01背包 贪心求解做题顺序,动态规划求解做哪个题。
【多重背包】Buns
传送门:Codeforces Lavrenty, a baker, is going to make several buns with stuffings and sell them.
HDU1565:方格取数(状压DP)
Problem Description 给你一个n*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。 Inp…