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-14 12:49:37
阅读次数:
214
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-09-13 20:08:35
阅读次数:
179
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-09-12 14:45:53
阅读次数:
213
首先my sql有个配置文件 my.ini,该文件在mysql的安装包中。1.在该文件中可以设置mysql的最大连接数,# The maximum amount of concurrent sessions the MySQL server will# allow. One of these con...
分类:
数据库 时间:
2014-09-11 16:43:02
阅读次数:
261
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of
vertex.
...
分类:
其他好文 时间:
2014-09-11 08:47:58
阅读次数:
260
最长公共子序列LCS有模板的吧#include#include#includeusing namespace std;int i,j,dp[1000][1000],len1,len2;char a[1000],b[1000];void LCS(){ memset(dp,0,sizeof(dp)...
分类:
其他好文 时间:
2014-09-10 22:18:01
阅读次数:
167
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4991
Ordered Subsequence
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 221 Accepted Su...
分类:
其他好文 时间:
2014-09-10 15:56:40
阅读次数:
145
问题描述:序列X={x1,x2,…,xn},Y={y1,y2,…,yn},当Z={z1,z2…,zn}是X的严格递增下标顺序(可以不连续)的子集,也是Y的严格递增下标顺序(可以不连续)的子集,则Z是X和Y的公共子序列。例如X={A,B,C,B,D,A,B},Y={B,D,C,A,B,A},{B,C,A}、{B,C,B,A}、{B,D,A,B}都是X和Y的公共子序列。其中最长的公共子序列叫做Long...
分类:
其他好文 时间:
2014-09-10 15:53:20
阅读次数:
317
做Web开发时经常涉及到页面之间的转跳,页面之间的转跳就会涉及到页面之间参数的传递,通过URL传递参数是常用的方法之一,但是微软 说:"Maximum URL length is 2,083 characters in Internet Explorer",...
分类:
其他好文 时间:
2014-09-10 12:50:40
阅读次数:
219
题目链接:hdu 4991 Ordered Subsequence
题目大意:给定一个序列,求有多少个子序列满足长度为m,并且递增。
解题思路:dp[i][j]表示说选了以第i个数为结尾,长度为j的递增子串方案数。将每个数离散化后用树状数组维护即可。
#include
#include
#include
#include
#define lowbit(x) ((x)&(-x...
分类:
其他好文 时间:
2014-09-10 12:37:10
阅读次数:
235