zoj 2744 Palindromes
来源:互联网 发布:centos虚拟机桥接模式 编辑:程序博客网 时间:2024/06/04 19:47
2009-05-0809:17:35
ZOJ Problem Set - 2744
ZOJ Problem Set - 2744
Palindromes
Time Limit: 1 Second Memory Limit: 32768 KB
Source: Zhejiang Provincial Programming Contest 2006
Submit Status
Time Limit: 1 Second Memory Limit: 32768 KB
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.
Input
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.
Output
A single line with the number of palindrome substrings for each case.
Sample Input
aba
aa
Sample Output
4
3
Author: LIU, Yaoting
Source: Zhejiang Provincial Programming Contest 2006
Submit Status
- ZOJ-2744-Palindromes
- zoj 2744 Palindromes
- zoj 2744 Palindromes
- ZOJ 2744 Palindromes
- ZOJ 2744 Palindromes
- zoj 2744 - Palindromes
- ZOJ 2744 Palindromes 区间DP
- ZOJ 1325 Palindromes
- zoj 2744 Palindromes (求回文子序列的个数)
- ZOJ Problem Set - 2744 Palindromes(字符串二分处理的好题)
- zju 2744 Palindromes
- Palindromes
- Palindromes
- Palindromes
- Palindromes
- Palindromes
- Palindromes
- Palindromes
- SQL Server数据库开发的二十一条军规
- 默认值对象的创建与使用
- 防止SQL注入攻击
- IT人 不要一辈子靠技术生存
- sql DATEPART函数使用
- zoj 2744 Palindromes
- 程序的世界
- 在Debian(VM)上用LVM调整分区的大小
- SmtpMail.SmtpServer.Insert()
- HLSL初级教程
- c#(.net)中传递中文参数时可能会出错,下面是一种解决办法
- UI界面设计师
- 计算一年有多少个周,每个周的开始日期和结束日期是什么
- 窗口打开后自动最大化,屏蔽工具栏