码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果)
解题报告 之 POJ2699 The Maximum Number of Strong Kings
解题报告 之 POJ 2699 The Maximum Number of Strong Kings 最大流 二分 枚举 建图...
分类:其他好文   时间:2015-04-25 13:44:54    阅读次数:216
Java for LeetCode 005 Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:编程语言   时间:2015-04-25 12:09:43    阅读次数:158
LeetCode (23) 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 you...
分类:其他好文   时间:2015-04-24 21:14:14    阅读次数:171
【算法设计-分治】最大子数组问题
先写上代码: #include using namespace std; typedef struct maximum { int left; int right; int sum; }Maximum; Maximum* FIND_MAX_CROOSING_SUBARRAY(int *A,int low,int mid,int high); Maximum* FIND_MAXI...
分类:编程语言   时间:2015-04-24 14:19:44    阅读次数:201
子数组之和的最大值(二维)
解法一:      最直接的方法,枚举一个矩形区域,然后再求这个矩形区域中元素的和。 int max(int x, int y) { return (x > y) ? x : y; } //@parameters //n,行数 //m,列数 int MaxSum(int *A, int n, int m) { maximum = -INF; for (i_min = 1; ...
分类:编程语言   时间:2015-04-24 09:07:47    阅读次数:214
POJ 3693 (后缀数组) Maximum repetition substring
找重复次数最多的字串,如果有多解,要求字典序最小。我也是跟着罗穗骞菊苣的论文才刷这道题的。首先还是枚举一个循环节的长度L,如果它出现两次的话,一定会包含s[0], s[L], s[2L]这些相邻两个之间。然后枚举相邻的两个,尽可能的向前和向后延伸,假设延伸长度为k,则重复次数为k / L + 1向后...
分类:编程语言   时间:2015-04-23 22:55:03    阅读次数:184
Maximum Subarray——LeetCode
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,...
分类:其他好文   时间:2015-04-23 12:51:25    阅读次数:102
JFS与JFS2的区别
请问一下JFS与JFS2的区别? 支持最大的文件? 普通JFS:2G;支持大文件JFS:64G;JFS2:1T 支持最大的文件系统?普通JFS,支持大文件JFS,JFS2分别是多大呢?The maximum file size and maximum file system size is limi...
分类:其他好文   时间:2015-04-23 02:00:05    阅读次数:184
OJ练习24——T104 Maximum Depth of Binary Tree
求二叉树深度。【思路】很简单,二叉树经典。用递归求左树右树的深度,较大值加1即可。【other code】int maxDepth(TreeNode *root) { if(root==NULL) return 0; //if(maxDepth(ro...
分类:其他好文   时间:2015-04-22 23:53:08    阅读次数:165
poj 3693 Maximum repetition substring(08合肥 RMQ+后缀数组)
传送门:http://poj.org/problem?id=3693 题目:给出一个串,求重复次数最多的连续重复子串; 分析: 枚举重复单元的长度,然后理所当然的枚举起点。利用rmq处理,后缀i,i+l的最长前缀。 lcp/l+1,为当前相邻l长度单元的串的重复次数,但是由于i+=l,提高了效率,但是i不一定刚好是重复串的起点,所以如果r%l!=0,把串往前移l-r%l个单位。找到...
分类:编程语言   时间:2015-04-22 09:36:52    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!