We calla,ba,ba,bnon-equivalent if and only ifa≠ba neq ba=banda≠reva neq reva=rev, whererevrevrevrefers to the string obtained by reversing characters ofsss, for examplerev=acbarev=acbarev=acba. There is a stringsssconsisted of lower-case letters. You need to find some substrings ofsssso that any two of them are non-equivalent. Find out what's the largest number of substrings you can choose.
We call a,ba,ba,b non-equivalent if and only if a≠ba neq ba=b and a≠rev(b)a neq rev(b)a=rev(b), where rev(s)rev(s)rev(s) refers to the string obtained by reversing characters of sss, for example rev(abca)=acbarev(abca)=acbarev(abca)=acba. 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.
(图片来源网络,侵删)