码迷,mamicode.com
首页 >  
搜索关键字:a subsequence of a g    ( 1119个结果
HDU5284——水,strlen坑——wyh2000 and a string problem
Young theoretical computer scientist wyh2000 is teaching young pupils some basic concepts about strings.A subsequence of a stringsis a string that can...
分类:其他好文   时间:2015-07-20 15:52:23    阅读次数:87
HDU3530 Subsequence(单调队列)
题意是说给出一个序列,现在要求出这个序列的一个最长子区间,要求子区间的最大值与最小值的差在[m, k]范围内,求区间长度做法是维护两个队列,一个维护到当前位置的最大值,一个维护最小值,然后计算当前节点i作为右端点的最常区间长度,那么扫描两个队列,维持单调性。然后比较两个队列头的差值,1.如果差值满足...
分类:其他好文   时间:2015-07-20 12:31:19    阅读次数:134
HDU - 3530 Subsequence
DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference betwee...
分类:其他好文   时间:2015-07-20 12:21:06    阅读次数:82
pat1007. Maximum Subsequence Sum (25)
1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a sequence of K integers { N1, N2, ..., NK}. A conti...
分类:其他好文   时间:2015-07-20 09:12:29    阅读次数:107
POJ3061 Subsequence(二进制前缀和法律+仿真足)
二分法+前缀和法律满足子序列长度的条件(0,n)之间,sum[x+i]-sum[i]从i元素开始序列长度x和。前缀和可在O(n)的时间内统计sum[i]的值。再用二分找出满足条件的最小的子序列长度。#include#include#include#include#include#include#in...
分类:其他好文   时间:2015-07-18 16:56:42    阅读次数:116
hdu 1159 Common Subsequence (dp乞讨LCS)
Common SubsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24489Accepted Submission(s): 108...
分类:其他好文   时间:2015-07-18 16:49:33    阅读次数:104
HDU 3530 Subsequence
这个题意是给你n个数,然后寻找一个区间,区间的最大值与最小值的差要小于k并且大于m 思路: 用两个单调序列维护这个序列,显而易见用当前者两个单调序列的列首相减如果大于k的话那么,我们就要寻找列首在序列位置比较小的那个往后面加1。这个题目的难点在于题目意思是区间,我理解错了。以为是那种最长公共子序列那种。 #include #include #include using namespac...
分类:其他好文   时间:2015-07-17 18:54:39    阅读次数:128
POJ-2533-Longest Ordered Subsequence(LIS模板)
Description A numeric sequence of ai is ordered if a1 #include #include using namespace std;int main(){ int n,i,j,a[1005],d[1005]; while(scanf("...
分类:其他好文   时间:2015-07-16 19:05:49    阅读次数:104
HDU 4632 Palindrome subsequence (区间dp 容斥定理)
Palindrome subsequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65535 K (Java/Others) Total Submission(s): 2610    Accepted Submission(s): 1050 Problem Description In mat...
分类:其他好文   时间:2015-07-16 00:50:13    阅读次数:195
HDU-1159 Common Subsequence(动态规划2)
DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence....
分类:其他好文   时间:2015-07-15 13:00:13    阅读次数:101
1119条   上一页 1 ... 79 80 81 82 83 ... 112 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!