
dp
文章平均质量分 79
饿狼干爹
理想是丰满的,现实是骨干的
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
杭电1003(Max Sum) 首次dp
点击打开杭电1003Problem 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 i原创 2015-04-29 10:18:47 · 1070 阅读 · 0 评论 -
杭电1159(Common Subsequence)LCS和dp
点击打开杭电1159Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of原创 2015-04-30 12:39:54 · 817 阅读 · 0 评论 -
杭电1503(Advanced Fruits)
点击打开杭电1503Problem DescriptionThe company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times thi原创 2015-04-30 14:06:20 · 1148 阅读 · 0 评论 -
杭电1024(Max Sum Plus Plus)
点击打开杭电1024Problem DescriptionNow I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced wi原创 2015-04-30 10:57:09 · 848 阅读 · 0 评论 -
LCS(最长公共子序列)和dp(动态规划)
参照:v_JULY_v 最长公共子序列定义: 注意最长公共子串(Longest CommonSubstring)和最长公共子序列(LongestCommon Subsequence, LCS)的区别:子串(Substring)是串的一个连续的部分,子序列(Subsequence)则是从不改变序列的顺序,而从序列中去掉任意的元素而获得的新序列;更简略地说,前者(子串原创 2015-04-30 12:15:49 · 3831 阅读 · 0 评论 -
杭电1423(Greatest Common Increasing Subsequence)
点击打开杭电1423Problem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. InputEach sequence is described with M - its length (1原创 2015-05-07 15:07:00 · 945 阅读 · 0 评论 -
杭电1513(Palindrome)
点击打开杭电1513Problem DescriptionA 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原创 2015-05-07 13:56:38 · 807 阅读 · 0 评论 -
杭电1257(最少拦截系统)dp方法
点击打开杭电1257最长递增子序列长度直接模板(最长递增子序列)代码实现:import java.util.Scanner;class P1257 { static int n; static int[] dp,a; public static void main(String[] args) { Scanner sc=new Scanner(Sys原创 2015-05-07 15:38:38 · 956 阅读 · 0 评论