Problem DescriptionAlice get a string S. She thinks palindrome string is interesting. Now she wanna know how many three tuple (i,j,k) satisfy 1≤i≤j<k≤length(S), S[i..j] and S[j1..k] are all palindrome strings. Its easy for her. She wants to know the …