题目描述:
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 longest palindromic substring.
解题思路:...
分类:
其他好文 时间:
2014-11-27 14:36:22
阅读次数:
187
使用马拉车算法,时间复杂度为O(n),算法详细解释在上一篇文章中。//// main.cpp// Longest Substring//// Created by Bowie Hsu on 14/11/21.// Copyright (c) 2014年 Bowie Hsu . All ...
分类:
其他好文 时间:
2014-11-27 12:38:37
阅读次数:
137
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...
分类:
其他好文 时间:
2014-11-27 07:59:55
阅读次数:
184
USACO Palindromic Squares...
分类:
其他好文 时间:
2014-11-19 20:35:38
阅读次数:
165
J -UNIMODAL PALINDROMIC DECOMPOSITIONSTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 1221Appoint descriptio...
分类:
其他好文 时间:
2014-11-16 22:48:40
阅读次数:
204
Given a string S, find the longest palindromic substring in S.Note:This is Part II of the article:Longest Palindromic Substring. Here, we describe an ...
分类:
其他好文 时间:
2014-11-12 21:05:22
阅读次数:
345
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=465&page=show_problem&problem=2399最长的很简单,将串翻转过来后求两个串的lcs就是答案。。主要是字典序那里。。...
分类:
其他好文 时间:
2014-11-02 17:51:53
阅读次数:
260
#include #include #include #include using namespace std;void print(vector &num) { int len = num.size(); bool value_begin = false; for (int i=...
分类:
其他好文 时间:
2014-10-31 20:37:03
阅读次数:
210
DP、KMP什么的都太高大上了,自己想了个朴素的遍历方法。
【题目】
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 longest palin...
分类:
其他好文 时间:
2014-10-26 15:37:32
阅读次数:
249
数位DP。。。。Palindromic NumbersTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %llu[Submit] [Go Back] [Status]DescriptionA palindromic number ...
分类:
其他好文 时间:
2014-10-25 17:13:44
阅读次数:
233