码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果)
Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2014-12-03 12:11:27    阅读次数:136
Max Points on a Line
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * struct Point { * ...
分类:其他好文   时间:2014-12-03 12:05:12    阅读次数:181
修改Eclipse中格式化时默认行长度
eclipse 默认设置的换行长度, 格式化代码后,经常换行,非常难看。1.Java代码 打开Eclipse的Window菜单,然后Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:默...
分类:系统相关   时间:2014-12-03 01:37:36    阅读次数:240
Java字符串学习笔记
通过看jdk源码发现Java字符串中有如下关系: 接口中的方法默认都是抽象的可以写也可以不写。 public interface CharSequence { int length(); char charAt(int index); CharSequence subSequence(int start, int end); ...
分类:编程语言   时间:2014-12-02 22:38:36    阅读次数:254
最长公共子序列
最长公共子序列 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。 tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合...
分类:其他好文   时间:2014-12-02 19:22:22    阅读次数:194
uva--10405Longest Common Subsequence+dp
经典的最长公共子序列问题。 要注意的是题目中的输入会包含空格的情况,所以要用gets实现输入。 代码如下: #include #include #include using namespace std; int dp[1100][1100]; int main() { char str1[1100],str2[1100]; int i,j; whi...
分类:其他好文   时间:2014-12-02 19:17:00    阅读次数:227
《BI那点儿事》数据流转换——聚合
原文:《BI那点儿事》数据流转换——聚合聚合转换可以像T-SQL中的函数GROUP BY, Average, Minimum, Maximum, 和 Count一样对数据进行聚合运算。在图中可以看到数据以SampleID分组,对TotalSugar做Average、Maximum、Minimum、C...
分类:其他好文   时间:2014-12-02 10:13:19    阅读次数:284
Longest Palindromic Substring
动态规划Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
分类:其他好文   时间:2014-12-01 20:48:25    阅读次数:250
[LeetCode] Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:其他好文   时间:2014-12-01 19:06:37    阅读次数:195
malloc()和free()
为数组动态分配存储空间 #include #include int main(void) { double *ptd; int max; int number; int i=0; puts("What is the maximum number of type double entries?"); scanf("%d",&max); ptd =(double *)mall...
分类:其他好文   时间:2014-11-30 23:23:23    阅读次数:251
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!