#592. 「Nowcoder多校 2019 Day4」string
「Nowcoder多校 2019 Day4」string
当前没有测试数据。
题目描述
We call a,ba,ba,b non-equivalent if and only if and , where refers to the string obtained by reversing characters of , for example . There is a string sss consisted of lower-case letters. You need to find some substrings of sss so that any two of them are non-equivalent. Find out what's the largest number of substrings you can choose.
输入格式
A line containing a string sss of lower-case letters.
输出格式
A positive integer - the largest possible number of substrings of sss that are non-equivalent.
样例
样例输入 1
abac
样例输出 1
8
数据范围与提示
The set of following substrings is such a choice: .
1≤∣s∣≤2×10^5, sss is consisted of lower-case letters.