码迷,mamicode.com
首页 >  
搜索关键字:a subsequence of a g    ( 1119个结果
HDU 1159 Common Subsequence
思路参考这里#include#include#includeusing namespace std;#define Size 1000int table[Size+1][Size+1];int main(){ string A, B; while( cin>>A>>B )...
分类:其他好文   时间:2015-07-14 22:17:57    阅读次数:121
POJ 1458 Common Subsequence-dp-(最长公共子序列模型)
题意:裸最长公共子序列 分析: 直接套用模型,注意初始化和实现的是细节 代码: #include #include #include #define max(a,b) a>b?a:b using namespace std; int dp[1010][1010]; string a,b; int main() { while(cin>>a>>b){ for(int i=0;i<a.l...
分类:其他好文   时间:2015-07-14 15:37:56    阅读次数:96
HDU 4632 Palindrome subsequence(区间dp)
Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65535 K (Java/Others) Total Submission(s): 2595    Accepted Submission(s): 1039 Problem Description In mat...
分类:其他好文   时间:2015-07-10 15:15:28    阅读次数:127
ZOJ- 2136 Longest Ordered Subsequence
相比 HDOJ 的 fatmouse‘s speed 这道题只需要输出 最长子序列的长度#includeusing namespace std;#define Size 1000int main(){ int N1; int table[Size+1]; i...
分类:其他好文   时间:2015-07-08 22:07:17    阅读次数:110
LA 2678 Subsequence
题意:给出n个整数,给定整数S,求长度最短的连续序列,使它们的和大于或等于S第一种,是求前缀和,然后用lower_bound来找第二种,尺取法, 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #i...
分类:其他好文   时间:2015-07-08 14:31:26    阅读次数:127
LeetCode: Distinct Subsequences [115]
【称号】Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the ...
分类:其他好文   时间:2015-07-05 18:15:17    阅读次数:93
[POJ 3061] Subsequence
[POJ 3061] Subsequence 题解
分类:其他好文   时间:2015-06-30 21:47:37    阅读次数:121
poj 3061 Subsequence(尺取法)
题目连接: http://poj.org/problem?id=3061题目大意: 一个有n个数的序列和一个整数s,找出一个最短序列,最短序列中各个数相加的和大于等于s。解题思路: 题目比较简单,写博记录一下思想——尺取法,用其他方法也可以解决。 1 //#include 2 #includ...
分类:其他好文   时间:2015-06-29 21:57:01    阅读次数:118
[LintCode] 最长公共子序列
1 class Solution { 2 public: 3 /** 4 * @param A, B: Two strings. 5 * @return: The length of longest common subsequence of A and B. 6 ...
分类:其他好文   时间:2015-06-28 17:04:49    阅读次数:107
hdu 3530 Subsequence
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3530SubsequenceDescriptionThere is a sequence of integers. Your task is to find the longest subsequence ...
分类:其他好文   时间:2015-06-22 22:02:05    阅读次数:177
1119条   上一页 1 ... 80 81 82 83 84 ... 112 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!