当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6599:I Love Palindrome String

题目描述
You are given a string $S = s_1s_2..s_{|S|}$ containing only lowercase English letters. For each integer $i \in [1, |S|]$ , please output how many substrings $s_ls_{l + 1}...s_r$ satisfy the following conditions:

$\quad$ $\bullet$ $r - l + 1$ equals to $i$.

$\quad$ $\bullet$ The substring $s_ls_{l + 1}...s_r$ is a palindrome string.

$\quad$ $\bullet$ $s_ls_{l + 1}...s_{ \lfloor (l + r) / 2 \rfloor }$ is a palindrome string too.

$|S|$ denotes the length of string $S$.

A palindrome string is a sequence of characters which reads the same backward as forward, such as $madam$ or $racecar$ or $abba$.
输入解释
There are multiple test cases.

Each case starts with a line containing a string $S(1 \leq |S| \leq 3 \times 10^5)$ containing only lowercase English letters.

It is guaranteed that the sum of $|S|$ in all test cases is no larger than $4 \times 10^6$.
输出解释
For each test case, output one line containing $|S|$ integers. Any two adjacent integers are separated by a space.
输入样例
abababa
输出样例
7 0 0 0 3 0 0
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6599

最后修改于 2020-10-25T23:32:42+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 131072/131072K(Java/Others)