
ACM - 动态规划
文章平均质量分 83
Freenm
这个作者很懒,什么都没留下…
展开
-
HDU 2602 - Bone Collector
Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave … The bone collecto原创 2017-03-03 15:16:37 · 263 阅读 · 0 评论 -
HDU 2571 - 命运
Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格阵列原创 2017-03-03 12:42:25 · 321 阅读 · 0 评论 -
HDU 2955 - Robberies
Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t原创 2017-03-03 08:43:23 · 266 阅读 · 0 评论 -
HDU 2084 - 数塔
Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1原创 2017-03-02 00:03:00 · 413 阅读 · 0 评论 -
HDU 1506&1505 - Largest Rectangle in a Histogram & City Game
A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows原创 2017-03-01 22:28:35 · 350 阅读 · 0 评论 -
HDU 1003 - Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5原创 2017-03-01 23:21:40 · 326 阅读 · 0 评论 -
POJ 3368 & UVA 11235 - Frequent values
RMQ应用题。解题思路参考:http://blog.youkuaiyun.com/libin56842/article/details/46482803#include#include#include#include#define MAXN 100000+5using namespace std;int num[MAXN],a[MAXN];int n,q,seg_num原创 2017-05-03 13:13:22 · 360 阅读 · 0 评论