АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

39. Maximal Palindrom

Time Limit: 2 seconds
Memory Limit:10000KB
Points:15
View Problem Statistics Submit Problem added Administrator

Дана строка символов. Найдите в ней подстроку максимальной длины, являющуюся палиндромом (то есть читающуюся одинаково слева направо и справа налево).

Input

Строка печатных символов, длина не превышает 100000 символов.

Output

Подстрока-палиндром максимальной длины. Если таких несколько, выведите любую.

Sample

InputOutput
bananasanana

View Problem Statistics Submit Author/source:
Sorted Problems / String Processing /
40. Maximal Common Substring 39.
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.421 sec.
© Copyright VSTU, AVT, Nosov D.A.