/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include #include using namespace std; string s; vector> dp; bool rec(int i,int j){ if(i>=j){ return true; } if(dp[i][j]!=-1){ return dp[i][j]; } if(s[i]!=s[j]){ return dp[i][j]=false; }else{ return dp[i][j]=rec(i+1,j-1); } } int main() { int n; cin>>n; cin>>s; int ans=0; dp.resize(n,vector(n,-1)); for(int i=0;i