Skip to main content
  1. Tags/

区间dp

2016

hdu 4283 You Are the One (区间dp)

·2 mins
hdu 4283题目链接 题意:有N个人按顺序排成一排上台表演,每个都有一个num[]值,若在他是第k个上场的人,则会有num[]*(k-1)的unhappiness。台下有一个黑屋(stack),对每一个人,可以选择让他先进屋子或者直接上台。现在让你找到一个最优方案使得所有人的unhappiness之和最小。

poj 3661 Running (区间dp)

·3 mins
poj 3661题目链接 题意:锻炼,一共n分钟,每分钟可以选择跑步或者休息,第i分钟跑步可以跑d[i]米,并增加一点疲劳度,如果选择休息,那么每分钟减少1点疲劳值。一旦开始休息,必须休息到疲劳值为0才能再次开始跑步。疲劳值不能超过m.第n分钟的时候疲劳值必须为0,否则之后会感觉身体被掏空。问n分钟最远多多远。

light oj 1422 - Halloween Costumes (区间dp)

·2 mins
light oj 1422 题目链接 题意: 按顺序去参加舞会。每个舞会对衣服都有要求。可以连续穿好多件衣服。需要时候就脱下来,但是一旦脱下来,这件衣服就报废了。问最少需要几件衣服。

poj 2955 Brackets(区间dp....括号匹配。。。人生第一道区间dp)

·2 mins
poj2955题目链接 题意:给出若干括号,问最大匹配数是多少。 思路:没有思路。我知道这是dp。。。然后其他就什么都不知道了。。。转移方程? 完全没思路。。知道了转移方程。。。。嗯,还是不会。。。边界怎么写?状态怎么推?循环顺序? 循环次序?我一点思路都没有。。。。。

2015

hdu 1114 - Piggy-Bank (完全背包)

·2 mins
F - Piggy-Bank **Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u Submit Status Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes all the coins and throws them into a piggy-bank. You know that this process is irreversible, the coins cannot be removed without breaking the pig. After a sufficiently long time, there should be enough cash in the piggy-bank to pay everything that needs to be paid.

hdu 1087 - Super Jumping! Jumping! Jumping! (最长上升子序列)

·2 mins
E - Super Jumping! Jumping! Jumping! **Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u Submit Status Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.