Greatest K-Palindrome Substring

UVALive - 4144