LeetCode: Palindrome PartitionGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome ...
分类:
其他好文 时间:
2014-08-24 19:21:22
阅读次数:
196
Longest Palindromic Substring
Total Accepted: 17474 Total
Submissions: 84472My Submissions
Given a string S, find the longest palindromic substring in S. You may assume that the maximum l...
分类:
其他好文 时间:
2014-08-24 16:46:02
阅读次数:
190
Longest Substring Without Repeating Characters
Total Accepted: 20506 Total
Submissions: 92223My Submissions
Given a string, find the length of the longest substring without repeating char...
分类:
其他好文 时间:
2014-08-23 21:42:21
阅读次数:
359
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-08-23 21:35:21
阅读次数:
264
Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni...
分类:
其他好文 时间:
2014-08-23 21:34:11
阅读次数:
288
POJ 3693 Maximum repetition substring
题目链接
题意:给定一个字符串,求出其子串中,重复次数最多的串,如果有相同的,输出字典序最小的
思路:枚举长度l,把字符串按l分段,这样对于长度为l的字符串,肯定会包含一个分段位置,这样一来就可以在每个分段位置,往后做一次lcp,求出最大匹配长度,然后如果匹配长度有剩余,看剩余多少,就往前多少位置再做一次...
分类:
其他好文 时间:
2014-08-23 19:05:11
阅读次数:
215
var url = 'http://www.deikang.com/index.php?tel=15811296111&status=1&id=100';var n = url.indexOf('?');//alert(n);var m = url.substring(n + 1, url.leng...
分类:
Web程序 时间:
2014-08-23 13:59:20
阅读次数:
148
题意 输入一个城市的滑雪地图 你可以从高的地方滑到伤下左右低的地方 求这个城市的最长滑雪线路长度 即在一个矩阵中找出最长递减连续序列
令d[i][j]为以格子map(i,j)为起点的最长序列 则有状态转移方程d[i][j]=max{d[a][b]}+1 a,b为与i,j相邻且值比i,j小的所有点
#include
#include
#include
using na...
分类:
其他好文 时间:
2014-08-23 11:25:20
阅读次数:
245
安装apache[root@centos64x64ctyun]#tarzxfhttpd-2.2.17.tar.gz[root@centos64x64ctyun]#cdhttpd-2.2.17[root@centos64x64httpd-2.2.17]#./configure--prefix=/application/apache2.2.17--enable-deflate--enable-expires--enable-headers--enable-modules=most--enable-so--wi..
分类:
数据库 时间:
2014-08-22 18:10:59
阅读次数:
233
使用CCTexture2D来创建动画效果,前提资源是有一张合成的大图
下面看具体的做法:
CCSprite* heroSprite = CCSprite::create();
heroSprite -> setAnchorPoint(ccp(0.35,0.3));
heroSprite -> setPosition(ccp(heroSprite -> getContentSize().wi...
分类:
其他好文 时间:
2014-08-22 16:22:19
阅读次数:
212