7103: BZOJ3103:Palindromic Equivalence
Memory Limit:128 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
给出一个由小写字母组成的字符串S,问有多少由小写字母
构成的字条串S',满足
1:|S|'=|S|
2:S'[L..R]是回文串,当且仅当S[L..R]是回文串
输入格式
一个字符串S,长度<=10^6
输出格式
输出答案Mod10^9+7
样例输入
abba
样例输出
650 Only words of the form xyyx are palindromically equivalent to abba, where x and y are distinct letters. The English alphabet contains 26 letters, consequently there are 26*25=650 such words in total.
提示
题目来源
没有写明来源