Longest Palindromic Substring
Print the length of the longest contiguous palindrome inside S.
Input: one line with the string S.
Output: the length of the longest palindromic substring.
Constraints:
- 1 ≤ |S| ≤ 1000
- lowercase letters
Sample Tests
Input 1
babad
Output 1
3
Input 2
abacdfgdcaba
Output 2
3
Discussion (opens after you solve — no spoilers before)
No comments yet.