АВТ
Language:

Remote Training on Programming

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

40. Maximal Common Substring

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

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

Input

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

Output

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

Sample

InputOutput
potato
tomato
ato

View Problem Statistics Submit Author/source:
Sorted Problems / String Processing /
40. 39. Maximal Palindrom
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.655 sec.
© Copyright VSTU, AVT, Nosov D.A.