动态规划
文章平均质量分 61
林夕_
越努力 越幸运,虽一路上无人可依,但要走的无谓。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【hdu1069】Monkey and Banana (动态规划)
一组研究人员正在设计一项实验,以测试猴子的智商。他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子。如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉。研究人员有n种类型的砖块,每种类型的砖块都有无限个。第i块砖块的长宽高分别用xi,yi,zi来表示。 同时,由于砖块是可以旋转的,每个砖块的3条边可以组成6种不同的长宽高。在构建塔时,当且仅当A砖块的长和宽原创 2017-08-08 19:37:05 · 630 阅读 · 0 评论 -
【hdu1176】免费馅饼+动态规划
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,原创 2017-08-08 19:44:03 · 322 阅读 · 0 评论 -
【common subsequence】动态规划+回溯求LCS
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of X原创 2017-08-08 19:59:46 · 558 阅读 · 0 评论 -
【hdu1257】最少拦截系统+LIS(最长上升子序列)
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹*都不能超过前一发的高度*.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截原创 2017-08-09 16:57:01 · 902 阅读 · 0 评论 -
【bellovin】LIS+dp
Peter has a sequence a1,a2,…,ana1,a2,…,an and he define a function on the sequence – F(a1,a2,…,an)=(f1,f2,…,fn)F(a1,a2,…,an)=(f1,f2,…,fn), where fifi is the length of the longest increasing subsequence原创 2017-08-10 10:44:50 · 419 阅读 · 0 评论 -
【HDU1087】Super Jumping
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. The game can be原创 2017-08-20 10:43:02 · 260 阅读 · 0 评论 -
【hdu1029 】Ignatius and the Princess IV
“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell m原创 2017-08-20 10:45:38 · 282 阅读 · 0 评论
分享