#P3805. 【模板】Manacher

【模板】Manacher

Description

Given a string SS consisting only of lowercase English letters $\texttt a,\texttt b,\texttt c,\ldots\texttt y,\texttt z$, find the length of the longest palindromic substring in SS.

The length of the string is nn.

Input Format

One line containing a string SS consisting of lowercase English letters $\texttt a,\texttt b,\texttt c,\cdots,\texttt y,\texttt z$.

Output Format

Output a single integer representing the answer.

aaa
3

Hint

1n1.1×1071 \le n \le 1.1 \times 10^7

Translated by ChatGPT 5