码迷,mamicode.com
首页 >  
搜索关键字:a subsequence of a g    ( 1119个结果
521. Longest Uncommon Subsequence I
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi ...
分类:其他好文   时间:2017-10-17 12:18:49    阅读次数:104
HDU 4632 Palindrome subsequence (区间DP)
题意:给定一个字符串,问它的集合中有多少个回文串。 析:dp[i][j] 表示区间 i 到 j,有多少个回文串, 如果 s[i] == s[j] dp[i][j] = dp[i+1][j] + dp[i][j-1] + 1。 否则 dp[i][j] = dp[i+1][j] + dp[i][j-1] ...
分类:其他好文   时间:2017-10-15 19:41:21    阅读次数:148
674. Longest Continuous Increasing Subsequence
Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1: Example 2: Note: Length of the array wil ...
分类:其他好文   时间:2017-10-15 19:36:02    阅读次数:137
[hdu3530]Subsequence (单调队列)
题意:求在一段序列中满足m<=max-min<=k的最大长度。 解题关键:单调队列+dp,维护前缀序列的最大最小值,一旦大于k,则移动左端点,取max即可。 ...
分类:其他好文   时间:2017-10-09 09:55:38    阅读次数:122
LeetCode 402: Remove K Digits
Note: 1. Find a increasing digits number. It's kind of longest increasing subsequence but with fixed size. 2. Remember to remove the zeros from beginn ...
分类:其他好文   时间:2017-10-08 16:50:40    阅读次数:168
Subsequence Count (线段树)
这题简直了......不论是基础的处理方式还是维护方式都很巧妙。 ...
分类:其他好文   时间:2017-10-06 21:22:08    阅读次数:159
POJ2533 Longest Ordered Subsequence —— DP 最长上升子序列(LIS)
题目链接:http://poj.org/problem?id=2533 Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 55459 Accepted: 24864 Descr ...
分类:其他好文   时间:2017-10-03 21:38:06    阅读次数:180
POJ1458 Common Subsequence —— DP 最长公共子序列(LCS)
题目链接:http://poj.org/problem?id=1458 Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 55099 Accepted: 22973 Description A ...
分类:其他好文   时间:2017-10-03 21:35:50    阅读次数:169
【bzoj3638】Cf172 k-Maximum Subsequence Sum 模拟费用流+线段树区间合并
题目描述 给一列数,要求支持操作: 1.修改某个数的值 2.读入l,r,k,询问在[l,r]内选不相交的不超过k个子段,最大的和是多少。 输入 The first line contains integer n (1?≤?n?≤?105), showing how many numbers the ...
分类:其他好文   时间:2017-09-29 09:51:51    阅读次数:140
[LeetCode] Longest Continuous Increasing Subsequence 最长连续递增序列
Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1: Example 2: Note: Length of the array wil ...
分类:其他好文   时间:2017-09-29 00:09:34    阅读次数:144
1119条   上一页 1 ... 37 38 39 40 41 ... 112 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!