码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果)
N - Longest Ordered Subsequence POJ 2533 (最长上升子序列 )
N - Longest Ordered Subsequence Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2533 Description A numeric sequence of ai is ordered if a1 < a2 < ...
分类:其他好文   时间:2015-05-02 11:14:23    阅读次数:125
12. binary search Trees
12. binary search Trees The search tree data structure supports many dynamic-set operations,including search ,minimum,maximum,predecessor,successor ,i...
分类:其他好文   时间:2015-05-01 23:45:21    阅读次数:263
HDU ACM 1530 Maximum Clique->最大团
分析:最大团的模版题,DFS深搜。 #include using namespace std; #define N 55 int map[N][N]; int set[N]; int max; bool IsConnect(int end,int v) { int i; for(i=0;i<end;i++) if(!map[set[i]][v]) return false; ...
分类:其他好文   时间:2015-05-01 13:27:54    阅读次数:157
LeetCode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 题意:求树的高度。 思路:就是递归。 /** * Definiti...
分类:其他好文   时间:2015-05-01 12:06:48    阅读次数:163
杭电 HDU ACM 1159 Common Subsequence
Common Subsequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26493    Accepted Submission(s): 11771 Problem Description A subsequ...
分类:其他好文   时间:2015-04-30 18:16:00    阅读次数:105
(字符串)最长公共子序列(Longest-Common-Subsequence,LCS)
问题:最长公共子序列就是寻找两个给定序列的子序列,该子序列在两个序列中以相同的顺序出现,但是不必要是连续的。例如序列X=ABCBDAB,Y=BDCABA。序列BCA是X和Y的一个公共子序列,但是不是X和Y的最长公共子序列,子序列BCBA是X和Y的一个LCS,序列BDAB也是。思路:1、最简单的方法就...
分类:其他好文   时间:2015-04-30 17:54:16    阅读次数:103
LCS(最长公共子序列)和dp(动态规划)
参照:v_JULY_v        最长公共子序列定义:         注意最长公共子串(Longest CommonSubstring)和最长公共子序列(LongestCommon Subsequence, LCS)的区别:子串(Substring)是串的一个连续的部分,子序列(Subsequence)则是从不改变序列的顺序,而从序列中去掉任意的元素而获得的新序列;更简略地说,前者(子串...
分类:其他好文   时间:2015-04-30 14:23:18    阅读次数:146
杭电1159(Common Subsequence)LCS和dp
点击打开杭电1159 Problem Description A 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 14:20:31    阅读次数:120
5. Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2015-04-30 06:19:30    阅读次数:117
UVa11404Palindromic Subsequence(最大回文串,区间DP)
UVa11404Palindromic Subsequence(最大回文串,区间DP) Description A Subsequence is a sequence obtained by deleting zero or more characters in a string. A Palindrome is a string which when read from left t...
分类:其他好文   时间:2015-04-29 17:23:29    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!