Longest Palindrome
1304B1100· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
3 3tabonebat
Output
6tabbat
Sample 2of 4
Input
4 2oooxxoxx
Output
6oxxxxo
Sample 3of 4
Input
3 5hellocodeforces
Output
0
Sample 4of 4
Input
9 4ababbabaabcdbcdecdefdefgwxyzzyxwijji
Output
20ababwxyzijjizyxwbaba
58%
1304B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)