7 人解决,9 人已尝试。
10 份提交通过,共有 77 份提交。
6.9 EMB 奖励。
单点时限: 1.0 sec
内存限制: 512 MB
Alice like strings, especially long strings. For each string, she has a special evaluation system to judge how elegant the string is. She defines that a string abcbabc
is one-and-half palindromic string, and abccbaabc
is not. Now, Alice has generated some long strings. She ask for your help to find how many substrings which is one-and-half palindromic.
There is only one line containing a string (the length of string is less than or equal to
Output an integer denoting the number of one-and-half palindromic substrings.
abcbabc
1
abccbaabc
0
ababcbabccbaabc
2
7 人解决,9 人已尝试。
10 份提交通过,共有 77 份提交。
6.9 EMB 奖励。