Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes
分类:
其他好文 时间:
2016-02-15 22:38:44
阅读次数:
197
综合性很强的一道题目,结合manacher,后缀数组,哈希,RMQ,二分可解。基本思路是通过manacher可以找到所有可能的回文串,哈希去重,后缀数组二分找数目。最后暴力求解。需要注意kth需要为__int64。 1 /* 4426 */ 2 #include <iostream> 3 #incl
分类:
其他好文 时间:
2016-02-05 01:49:59
阅读次数:
177
/* Write a function to compute the maximum length palindromic sub-sequence of an array. A palindrome is a sequence which is equal to its reverse. A su...
分类:
其他好文 时间:
2016-01-25 06:38:13
阅读次数:
200
Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.Given a number base B (2 2 #include 3 #in.....
分类:
其他好文 时间:
2016-01-25 06:33:11
阅读次数:
181
5. Longest Palindromic SubstringMy SubmissionsQuestionTotal Accepted:87802Total Submissions:399054Difficulty:MediumGiven a stringS, find the longest p...
分类:
编程语言 时间:
2016-01-15 20:02:14
阅读次数:
227
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...
分类:
其他好文 时间:
2016-01-12 01:07:01
阅读次数:
218
题目来源:https://leetcode.com/problems/longest-palindromic-substring/Given a stringS, find the longest palindromic substring inS. You may assume that the ...
分类:
其他好文 时间:
2015-12-25 21:02:43
阅读次数:
195
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lon...
分类:
其他好文 时间:
2015-12-09 17:18:01
阅读次数:
115
Total Accepted:82026Total Submissions:379898Difficulty:MediumGiven a stringS, find the longest palindromic substring inS. You may assume that the maxi...
分类:
其他好文 时间:
2015-12-07 22:48:22
阅读次数:
294
时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA number that will be the same when it is written forwards or backwards is known as a Palind...
分类:
其他好文 时间:
2015-12-06 11:29:44
阅读次数:
167