码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
POJ - 3693 Maximum repetition substring(后缀数组求重复次数最多的连续重复子串)
Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of ...
分类:其他好文   时间:2014-09-28 19:34:34    阅读次数:417
HDU 5052 Yaoge’s maximum profit 裸树链剖分 2014 ACM/ICPC Asia Regional Shanghai Online
题意: 给定n个点的带点权树。 下面n行给出每个点点权表示每个点买卖鸡腿的价格 下面n-1行给出树边 下面Q个操作 Q行 u, v, val 从u走到v,过程中可以买一个鸡腿,然后到后面卖掉,输出max(0, 最大的收益) 然后给[u,v]路径上点点权+=val 思路: 树链剖分裸题 屌丝题解:点击打开链接 #pragma comment(linker, "/STA...
分类:其他好文   时间:2014-09-28 18:19:26    阅读次数:288
[leetcode]Maximum Product Subarray
新题。。。不过很简单。。半年才更新一个题。。。class Solution {public: int maxProduct(int arr[], int n) { int pmax = arr[0]; int pmin = arr[0]; int an...
分类:其他好文   时间:2014-09-28 13:25:52    阅读次数:178
Max Points on a Line
题目描述:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.解题方案:该题想不到其他好办法,唯有暴力破解,两点求斜率,如果斜率相同,意味着共线,然后求出最大...
分类:其他好文   时间:2014-09-28 10:50:31    阅读次数:162
[leetcode] Maximum Product Subarray @ python
[leetcode] Latest added:2014-09-23Find the contiguous subarray within an array (containing at least one number) which has the largest product.For exam...
分类:编程语言   时间:2014-09-28 01:51:00    阅读次数:499
TCP listen() Backlog
The backlog has an effect on the maximum rate at which a server can accept new TCP connections on a socket. The rate is a function of both the backlog value and the time that connections stay on th...
分类:其他好文   时间:2014-09-28 00:32:21    阅读次数:301
leetcode Maximum Product Subarray
#include#includeusingnamespacestd;intmin(inta,intb){returna>b?b:a;}intmax(inta,intb){returna>b?a:b;}intmaxProduct(intA[],intn){if(n==0){return0;}if(n=...
分类:其他好文   时间:2014-09-27 23:27:10    阅读次数:188
HDU5052 Yaoge’s maximum profit(LCT)
典型的LCT操作,但是维护的是一个序列最左边减最右边的最小值,所以要维护左边减右边的最小值del[0]和一个右边减左边的最小值del[1](因为rev标记swap的时候对应的值也要交换)。维护的时候del[0]可能是来自于左右儿子的del[0],也有可能是来自于左儿子的最小值减去右儿子及当前节点的值...
分类:其他好文   时间:2014-09-27 22:14:40    阅读次数:303
【UVA】108 - Maximum Sum(DP矩阵)
n^3的复杂度计算最小子矩阵,用了最大连续和的DP算法。 14273282 108 Maximum Sum Accepted C++ 0.013 2014-09-27  #include #include #include using namespace std; const int INF = 1 << 30; co...
分类:其他好文   时间:2014-09-27 21:38:40    阅读次数:208
移动终端屏幕自适应的一点经验
1)地球人都知道采用标签: <meta?name="viewport"?content="width=device-width,height=device-height,inital-scale=1.0,maximum-????scale=1.0,user-scalable=no;"> <meta?name="apple-mobile-web-app-...
分类:移动开发   时间:2014-09-27 14:47:50    阅读次数:249
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!