Problem 36
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
(Please...
分类:
其他好文 时间:
2014-08-25 10:06:04
阅读次数:
198
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
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
2D DP is an intuitive solution of course, but I got an MLE error, so I simplified it into a 1D DP:class Solution {public: void goDp(vector &dp, int...
分类:
其他好文 时间:
2014-08-06 06:14:40
阅读次数:
196
题目原文:
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-08-05 15:56:59
阅读次数:
290
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
题目: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)
ACM
题目地址:SPOJ MYQ10 Mirror Number
题意:
求[a,b]中回文的个数。
分析:
是SPOJ MYQ01的简单版...其实有非递归方法的。
代码:
/*
* Author: illuz
* Blog: http:...
分类:
其他好文 时间:
2014-08-02 20:56:24
阅读次数:
218
有一个比较容易出错的点:反转求最长公共子序列,这是错误的想法 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
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