![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----- 动态规划(DP)
谙忆
Java相关研发架构工作经验5年。拥有Java相关发明专利8余项。从事过支付行业,研发与架构的系统稳定地支撑着公司日千万交易笔数量级的支付和对账。
二手车SaaS内核研发3年经验+,拥有二手车行业SaaS相关发明专利6项,研发、架构的元数据内核与权限系统,每日亿万级接口调用。
Java企业开发丰富的理论知识和实战经验。2020年CSDN博客之星第12名,同时在一些社区担任名誉职位。认证为CSDN博客专家、CSDN专栏签约作者、InfoQ签约作者、阿里云ACE杭州同城会会长、阿里云社区认证专家、华为云·云享专家。
展开
-
HDOJ/HDU 1087 Super Jumping! Jumping! Jumping!(经典DP~)
Problem 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原创 2016-05-26 01:53:59 · 3157 阅读 · 0 评论 -
HDOJ1003Max Sum
Problem Description Given 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 + 4 =原创 2015-09-20 18:17:40 · 2277 阅读 · 0 评论 -
POJ 2533 Longest Ordered Subsequence
DescriptionA numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence (a1, a2, …, aN) be any sequence (ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <=原创 2015-10-26 21:13:36 · 1744 阅读 · 0 评论 -
最长公共子序列和最长公共子串
什么是最长公共子序列呢?举个简单的例子吧,一个数列S,若分别是两个或多个已知序列的子序列,且是所有符合条件序列中最长的,则S称为已知序列的最长公共子序列。举例如下,如:有两个随机数列,1 2 3 4 5 6 和 3 4 5 8 9,则它们的最长公共子序列便是:3 4 5。之前一直不明白:最长公共子串和最长公共子序列的区别。最长公共子串(Longest Common Substirng)和最长公共子序转载 2015-10-29 13:46:37 · 1570 阅读 · 0 评论 -
POJ 1159 Palindrome 最长公共子序列的问题
Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the原创 2015-10-29 14:03:48 · 1772 阅读 · 0 评论 -
最大子段和详解
最大子段和问题(Maximum Interval Sum)(有时也称LIS)经典的动态规划问题,几乎所有的算法教材都会提到.本文将分析最大子段和问题的几种不同效率的解法,以及最大子段和问题的扩展和运用.一.问题描述 给定长度为n的整数序列,a[1…n], 求[1,n]某个子区间[i , j]使得a[i]+…+a[j]和最大.或者求出最大的这个和.例如(-2,11,-4,13,-5,2)的最大子段和转载 2015-11-01 19:51:07 · 2019 阅读 · 0 评论 -
HDOJ 1081(ZOJ 1074) To The Max(动态规划)
Problem Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a r原创 2015-11-07 12:18:51 · 2433 阅读 · 0 评论 -
HDOJ 1003 Max Sum
Problem Description Given 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 + 4 =原创 2016-02-06 13:48:05 · 1842 阅读 · 0 评论 -
HDOJ 1028 Ignatius and the Princess III(递推)
Problem Description “Well, it seems the first problem is too easy. I will let you know how foolish you are later.” feng5166 says.“The second problem is, given an positive integer N, we define an equat原创 2016-03-27 12:30:22 · 2076 阅读 · 2 评论 -
HDOJ 1058 Humble Numbers(打表过)
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, … shows the first 20原创 2016-03-31 13:08:55 · 1575 阅读 · 0 评论 -
HDOJ 1391 Number Steps(打表DP)
Problem Description Starting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,… as shown in the figure. For example, 1, 2, and 3 has been written at points (1,1), (2,0),原创 2016-04-09 16:02:55 · 3594 阅读 · 5 评论 -
HDOJ 1420 Prepared for New Acmer(DP)
Problem Description 集训进行了将近2个礼拜,这段时间以恢复性训练为主,我一直在密切关注大家的训练情况,目前为止,对大家的表现相当满意,首先是绝大部分队员的训练积极性很高,其次,都很遵守集训纪律,最后,老队员也起到了很好的带头作用,这里特别感谢为这次DP专题练习赛提供题目和测试数据的集训队队长xhd同学.特别高兴的是,跟随集训队训练的一批新队员表现非常好,进步也比较显著,特别是训原创 2016-04-16 18:23:23 · 4937 阅读 · 0 评论 -
HDOJ/HDU 1029 Ignatius and the Princess IV(简单DP,排序)
此题无法用JavaAC,不相信的可以去HD1029题试下!Problem Description “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原创 2016-06-18 22:27:46 · 9720 阅读 · 0 评论