#P3805. Longest Palindromic Substring Length

    ID: 17055 Type: Default 1000ms 256MiB

Longest Palindromic Substring Length

Longest Palindromic Substring Length

Given a string \(S\) consisting only of lowercase English letters (\(a, b, c, \ldots, z\)), find the length of its longest palindromic substring. Let \(n\) represent the length of \(S\).

inputFormat

The input consists of a single line containing the string \(S\).

outputFormat

Output a single integer representing the length of the longest palindromic substring in \(S\).

sample

abac
3