Home => ProblemSet => 1.7-34:回文子串
Problem1155--1.7-34:回文子串

1155: 1.7-34:回文子串

Time Limit: 1 Sec  Memory Limit: 128 MB  Submit: 0  Solved: 6
[ Submit ] [ Status ] [ Creator: ][ 参考程序 ]

Description

给定一个字符串,输出所有长度至少为2的回文子串。

回文子串即从左往右输出和从右往左输出结果是一样的字符串,比如:abba,cccdeedccc都是回文字符串。

Input

一个字符串,由字母或数字组成。长度500以内。

Output

输出所有的回文子串,每个子串一行。
子串长度小的优先输出,若长度相等,则出现位置靠左的优先输出。

Sample Input Copy

123321125775165561

Sample Output Copy

33
11
77
55
2332
2112
5775
6556
123321
165561

Source/Category