AtCoder Beginner Contest 237
Ex
Hakata
AtCoder
⌀ 2807
原题
←G →
翻译中…

Problem Statement

翻译中…

We have a string $S$ consisting of lowercase English letters. Bob just thinks about palindromes every day. He decided to choose some of the substrings of $S$ that are palindromes and tell them to Anna.

翻译中…

Anna gets angry if one of the palindromes told by Bob is a substring of another.

翻译中…

How many palindromes can Bob choose while not making Anna angry?

翻译中…

Note

翻译中…

A substring of $S$ is the result of deleting zero or more characters from the beginning and the end of $S$. For example, ab is a substring of abc, while ac is not a substring of abc.

翻译中…

Constraints

翻译中…
  • $1 \leq |S| \leq 200$
  • $S$ consists of lowercase English letters.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

S

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
ababb
Output #1
3
Three palindromes `aba`, `bab`, `bb` can be chosen.
Input #2
xyz
Output #2
3
Three palindromes `x`, `y`, `z` can be chosen.
Input #3
xxxxxxxxxx
Output #3
1
题目信息
题号
abc237_h
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。