int test(int a,int b){ if(a>=b) return 1; if(s[a]!=s[b]) return 0; if(vis[a][b]) return pal[a][b]; vis[a][b]=1; return pal[a][b]=test(a+1,b-1); }