码迷,mamicode.com
首页 >  
搜索关键字:palindromic substrin    ( 620个结果
Prime Palindrome Golf
Prime Palindrome GolfDo you know how to play Prime Palindrome Golf? You are given a number and your challenge is to find the closest palindromic prime...
分类:其他好文   时间:2014-08-05 13:24:49    阅读次数:274
Longest Palindromic Substring leetcode java
题目: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 lo....
分类:编程语言   时间:2014-08-04 04:10:26    阅读次数:374
LightOJ 1205 - Palindromic Numbers (数位dp)
LightOJ 1205 - Palindromic Numbers (数位dp) ACM 题目地址:SPOJ MYQ10 Mirror Number 题意:  求[a,b]中回文的个数。 分析:  是SPOJ MYQ01的简单版...其实有非递归方法的。 代码: /* * Author: illuz * Blog: http:...
分类:其他好文   时间:2014-08-02 20:56:24    阅读次数:218
LeetCode--Longest Palindromic Substring
有一个比较容易出错的点:反转求最长公共子序列,这是错误的想法 1 class Solution { 2 public: 3 string longestPalindrome(string s) { 4 int n = s.length(); 5 int lon...
分类:其他好文   时间:2014-08-01 15:28:31    阅读次数:214
[leetcode]Longest Palindromic Substring
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:其他好文   时间:2014-08-01 04:47:25    阅读次数:243
xtu summer individual 1 E - Palindromic Numbers
E -Palindromic NumbersTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluDescriptionA palindromic number or numeral palindrome is a 'symm...
分类:其他好文   时间:2014-07-31 23:36:50    阅读次数:360
LightOJ 1205 Palindromic Numbers
数位DP。。。。 Palindromic Numbers Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu [Submit]   [Go Back]   [Status]   Description A palindro...
分类:其他好文   时间:2014-07-31 03:04:56    阅读次数:247
Java Longest Palindromic Substring(最长回文字符串)
如果一个字符串从左向右写和从右向左写是一样的,这样的字符串就叫做palindromic string,如aba,或者abba。本题是这样的,给定输入一个字符串,要求输出一个子串,使得子串是最长的padromic string。 下边演示3种思路   1.两侧比较法 以abba这样一个字符串为例来看,abba中,一共有偶数个字,第1位=倒数第1位,第2位=倒数第2位......第N位=倒数第...
分类:编程语言   时间:2014-07-08 17:49:03    阅读次数:238
LeetCode——Longest Palindromic Substring
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. 给定一个字符串S,找出其中的最长回文...
分类:其他好文   时间:2014-07-06 00:15:15    阅读次数:240
[题解]UVA11027 Palindromic Permutation
链接:http://vjudge.net/problem/viewProblem.action?id=19602描述:给出一个字符串,求重新排列后第n个回文串,若没有则输出”XXX“。思路:组合数问题。 首先考虑什么时候有回文串。很简单,数量为奇数的字母不超过1个。且这个字母只能是在字符串的中...
分类:其他好文   时间:2014-07-01 17:12:53    阅读次数:249
620条   上一页 1 ... 58 59 60 61 62 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!