import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int count(char[] str){ int n = str.length; if(str.length == 1) return 1; int[][] dp = new int[n][n]; boolean[][] P = new boolean[n][n]; for (int i= 0; i< n; i++) P[i][i] = true; for (int i=0; i