Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-09-30 17:19:19
阅读次数:
173
Maximum Entropy Model(最大熵模型) 推导
分类:
其他好文 时间:
2014-09-30 14:26:29
阅读次数:
156
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-09-29 03:53:16
阅读次数:
255
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
题意:
给定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
新题。。。不过很简单。。半年才更新一个题。。。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
题目描述: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] 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
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
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