码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果)
PAT Perfect Sequence (25)
题目描述 Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M <= m * p where M and m are the maximum and minimum numbers in the seq...
分类:其他好文   时间:2015-06-08 11:38:36    阅读次数:105
LeetCode 115:Distinct Sequence
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 orig...
分类:其他好文   时间:2015-06-08 00:54:18    阅读次数:151
HDU 1159 Common Subsequence--DP--(转化成矩阵)
题意:找最长公共子序列(不要求连续) 分析:二维dp肯定的,不过我自己用的四层循环,超时;正解是画矩阵,找规律。以后要多注意这种思想          WA了很多遍,原因:1.对数组边界的处理;2.while(1)超时,改成while(cin>>a>>b)就过了 代码: #include #include #define max(a,b) a>b?a:b using namespace s...
分类:其他好文   时间:2015-06-07 15:50:06    阅读次数:110
codeforces Looksery Cup 2015 H Degenerate Matrix
The determinant of a matrix 2?×?2 is defined as follows: A matrix is called degenerate if its determinant is equal to zero. The norm ||A|| of a matrix A is defined as a maximum of absolute v...
分类:其他好文   时间:2015-06-07 13:52:04    阅读次数:121
【leetcode】Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th...
分类:其他好文   时间:2015-06-07 12:28:40    阅读次数:78
Java for LeetCode 188 Best Time to Buy and Sell Stock IV【HARD】
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet...
分类:编程语言   时间:2015-06-06 22:05:00    阅读次数:169
hive udaf 用maven打包执行create temporary function 时报错
用maven打包写好的jar,在放到hive中作临时函数时报错。 错误信息如下: hive> create temporary function maxvalue as "com.leaf.data.Maximum"; java.lang.SecurityException: Invalid signature file digest for Manifest main attribu...
分类:其他好文   时间:2015-06-06 16:38:31    阅读次数:227
Java for LeetCode 163 Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:编程语言   时间:2015-06-05 21:00:00    阅读次数:128
LeetCode56:Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if yo...
分类:其他好文   时间:2015-06-05 15:48:10    阅读次数:129
[leetcode 5]longest palindromic substring
1 题目:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longe...
分类:其他好文   时间:2015-06-05 15:31:51    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!