题目描述
For every string given as input, you need to tell us the number of subsequences of it that are palindromes (need not necessarily be distinct). Note that the empty string is not a palindrome.
SAMPLE INPUT
1
aab
SAMPLE OUTPUT
4
Explanation
the palindromic subsequences of "aab" are:
"a", "a", "b", "aa", and the method returns 4.
输入格式
见题面
输出格式
见题面
样例输入
1
aab
SAMPLE
样例输出
4