#include void MaxSubsseqSum1(int A[], int N) { int ThisSum = 0, MaxSum = -1; int start,end; int temp = 0; for (int i = 0; iMaxSum){ ...
分类:
其他好文 时间:
2015-09-04 17:02:30
阅读次数:
418
解决方案1.查看进程数SQL>show parameter proceNAMETYPEVALUE------------------------------------ ----------- --------------aq_tm_processesinteger1db_writer_proces...
分类:
其他好文 时间:
2015-09-02 23:25:50
阅读次数:
463
在解决ORA-00020:maximum number of processes (150) exceeded问题时,不小心将processes值设置太大,就会造成这个问题。但此时DB已经被shutdown了, 直接startup DB无法启动, 如下报错.SYS> startupORA-00838...
分类:
其他好文 时间:
2015-09-02 23:23:21
阅读次数:
478
Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu...
分类:
其他好文 时间:
2015-09-02 15:57:57
阅读次数:
218
1. LISO (n^2):/* LIS(Longest Increasing Subsequence) 最长上升子序列 O (n ^ 2) 状态转移方程:dp[i] = max (dp[j]) + 1 (a[j] res; int i; for (i=pos[len]; ~fa[i]; i=fa....
分类:
其他好文 时间:
2015-09-02 13:43:44
阅读次数:
157
定义:RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题: 对于长度为n的数列A,回答若干询问RMQ(A,i,j) (i,jO(nlogn)*/2 void initRMQ(int n)3 {4 for(int i = 1; i (1 R)...
分类:
编程语言 时间:
2015-09-02 01:58:16
阅读次数:
197
题意:走n步,给出每步向左走概率l,向右走概率r,留在原地的概率 1-l-r,求能达到的最远右边距离的期望。分析;开始按期望逆求的方式分析,但让求的就是右边界没法退,懵了一会,既然逆着不能求,就先正着求概率,再根据期望的定义来求,试试行吗,想了想状态,dp[i][j][k],表示走了i步当前位置是j...
分类:
其他好文 时间:
2015-09-02 00:22:48
阅读次数:
177
(LIS Longest Increasing Subsequence)给定一个数列,从中删掉任意若干项剩余的序列叫做它的一个子序列,求它的最长的子序列,满足子序列中的元素是单调递增的。例如给定序列{1,6,3,5,4},答案是3,因为{1,3,4}和{1,5,4}就是长度最长的两个单增子序列。处看...
分类:
其他好文 时间:
2015-08-31 17:09:00
阅读次数:
254
func cap(v Type) int返回指定类型的容量,根据不同类型,返回意义不同。数组: 元素个数 (和len(v)一样).数组指针: *v的元素个数 (和len(v)一样).Slice: the maximum length the slice can reach when resliced...
分类:
其他好文 时间:
2015-08-30 17:16:43
阅读次数:
130
天,这题我已经没有底气高呼“水”了。。。题目的地址:https://leetcode.com/problems/sliding-window-maximum/题目内容:Given an arraynums, there is a sliding window of sizekwhich is mov...