当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1544:Palindromes

题目描述
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is read from right to left.

Now give you a string S, you should count how many palindromes in any consecutive substring of S.
输入解释
There are several test cases in the input. Each case contains a non-empty string which has no more than 5000 characters.

Proceed to the end of file.
输出解释
A single line with the number of palindrome substrings for each case.
输入样例
aba
aa
输出样例
4
3
来自杭电HDUOJ的附加信息
Author LIU, Yaoting
Recommend linle

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1544

最后修改于 2020-10-25T22:45:54+00:00 由爬虫自动更新

共提交 83

通过率 86.75%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)