码迷,mamicode.com
首页 >  
搜索关键字:子序列    ( 5133个结果
计算子序列和是定值的子序列个数
题目如下: Counting Subsequences Time Limit: 5000 MSMemory Limit: 65536 K Description ?"47 is the quintessential random number," states the 47 society. And there might be a grain of truth in that....
分类:其他好文   时间:2014-07-22 08:13:34    阅读次数:281
最长公共上升子序列(LCIS)ZOJ 2432
立方算法: #include #include #include #include #define M 505 using namespace std; typedef long long LL; LL a[M],b[M]; int dp[M][M]; int main() { //freopen("in.txt","r",stdin); int T; cin>>T; ...
分类:其他好文   时间:2014-07-20 23:01:50    阅读次数:284
POJ 2533 Longest Ordered Subsequence
题意:求最长递增子序列 AC代码:#include #include #include using namespace std; int dp[1010],a[1010]; int main() { int i,j,n; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;...
分类:其他好文   时间:2014-07-20 10:28:31    阅读次数:235
最长递增的子序列(模板)
一般情况: [cpp] view plaincopy #include   #include   #include   using namespace std;    int a[1005],dp[1005],n;    int LIS()  {      int i,j,ans,m;      dp[1] = 1;      ans = 1;      for(i = 2...
分类:其他好文   时间:2014-07-20 09:28:19    阅读次数:280
最长递增公共子序列
有奖征资源,博文分享有内涵      6月推荐文章汇总      CSDN博文大赛初赛晋级名单公布      【模板】最长递增公共子序列 分类: 【模板啊模板】 2013-08-01 18:13 262人阅读 评论(0) 收藏 举报 LICS模板 二维: [cpp] view plaincopy #include #...
分类:其他好文   时间:2014-07-20 00:05:39    阅读次数:386
最长公共子序列
[cpp] view plaincopy [cpp] view plaincopy #include #include #include using namespace std; char s1[1000],s2[1000]; int len1,len2,dp[1000][1000],mark[...
分类:其他好文   时间:2014-07-19 23:38:20    阅读次数:402
STL 源码剖析 算法 stl_algo.h -- search_n
search_n ---------------------------------------------------------------------------------------- 描述:在序列[first, last) 所涵盖的区间中,查找"连续 count 个符合条件之元素"所形成的子序列, 并返回迭代器 last 思路: 1.首先找出 value 第一次出现点 2.该出现点的后面是否连续出现 count - 1 个 value 3.如果是,找到了,如果不是,在当前元素后的区间重新找...
分类:其他好文   时间:2014-07-19 23:31:25    阅读次数:355
HDU 1231 最大连续子序列 (动规)
HDU 1231 最大连续子序列 (动规)...
分类:其他好文   时间:2014-07-19 23:16:58    阅读次数:270
2014CSUACM小组练习赛1
就一道中文题,就先看这道,是一道迷宫题,BFS可以解答,路径输出部分正好昨天看最长公共子序列遇到到过。然后做题过程中发现好多人都把第一题第二题做完了,这时候正好感觉D题有些代码量,就做A B,A题是水题,B题其实也是水题,一开始没看懂题,写了一大坨代码,结果time limited!然后就沉下心去....
分类:其他好文   时间:2014-07-19 14:16:45    阅读次数:292
POJ1458 Common Subsequence 【最长公共子序列】
Common Subsequence Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 37614   Accepted: 15058 Description A subsequence of a given sequence is the given seque...
分类:其他好文   时间:2014-07-19 11:17:54    阅读次数:218
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!