cf/mirror

Longest Palindrome

CF
1304B1100· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
3 3
tab
one
bat
Output
6
tabbat
Sample 2of 4
Input
4 2
oo
ox
xo
xx
Output
6
oxxxxo
Sample 3of 4
Input
3 5
hello
codef
orces
Output
0
Sample 4of 4
Input
9 4
abab
baba
abcd
bcde
cdef
defg
wxyz
zyxw
ijji
Output
20
ababwxyzijjizyxwbaba
1304B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)