Time limit5000 ms Memory limit1048576 kB OSLinux Yraglac is expecting to have a child in the near future. Being a mathematically-minded person, he would like his child’s name to be a pali
原创 2021-07-06 14:23:18
342阅读
首先表示感谢博主,http://blog.csdn.net/zhouworld16/article/details/16842467  求解最长回文子串的问题最近经常遇到,特别是近期的笔试,因而有了一个学习的契机。先说说回文字符串,回文字符串的意思是从左往右看和从右往左看都是一样的,即我们如果以中心为轴,这个字符串是左右对称的,如字符串"abcba","abba"。字符串"abcba"有
转载 精选 2015-09-10 17:42:14
295阅读
DP: Extend palindrome: (better)
转载 2019-09-30 13:59:00
116阅读
2评论
动态规划Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
转载 2014-12-01 19:48:00
55阅读
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exist
原创 2023-03-07 01:13:24
45阅读
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
转载 2015-08-09 00:16:00
68阅读
2评论
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-07-14 21:58:00
58阅读
2评论
题目题意:给定一个数,如果不是回文数则实施与其逆转数相加,直至出现回文数或者超过实施次数#include<iostream>#include<algorithm>using namespace std;bool isPal(string s) { int l=0,r=s.size()-1; while(l<r) if(s[l++]!=s[r-...
原创 2023-06-27 10:16:59
56阅读
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
原创 2021-08-07 11:40:16
133阅读
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem you will be given two integersi j, you have to fin
原创 2022-08-10 11:16:44
132阅读
原题链接 考察:数位dp 思路: 求回文数字的个数. dfs参数: 1.pos 枚举到第几位 2.len 回文数的长度. 其实不需要变量记录是否合法,不合法的不取搜就行了. ##Code #include <iostream> #include <cstring> using namespace s ...
转载 2021-06-01 00:14:00
60阅读
2评论
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c
转载 2019-03-11 16:38:00
43阅读
2评论
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...
转载 2015-01-25 09:45:00
32阅读
Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str
转载 2019-07-18 12:01:00
166阅读
2评论
647. Palindromic Substrings**https://leetcode.com/problems/palindromic-substrings/题目描述Given a string, your task is to count how many palindromic substrings in this string.The substrings with diffe...
原创 2022-05-30 10:50:28
33阅读
题目链接:https://leetcode.com/problems/longest-palindromic-substring/题目:Given a string S, find the longest palindroximum length of S is 1000, and
原创 2023-07-26 16:42:37
39阅读
https://leetcode.com/problems/longest-palindromic-substring/Given`
原创 2021-08-15 15:37:49
92阅读
进制转换,然后判断是否是回文
原创 2021-07-22 14:08:10
74阅读
Palindromic SubstringTime Limit: 10000msMemory Limit: 65536KBThis problem will be judged onHDU. Original ID:442664-bit integer IO format:%I64d Java cl...
转载 2015-11-07 19:05:00
47阅读
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c
转载 2019-07-05 09:13:00
44阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5