33OJ
登录 注册

#A0075. 【模板】Manacher

    ID: 100 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及+/提高− 上传者: 标签>字符串O2优化Manacher 算法

【模板】Manacher

Problem 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

1≤n≤1.1×1071 \le n \le 1.1 \times 10^7。

Translated by ChatGPT 5