IITKWPCE - Let us play with strings
Feluda likes palindromes very much. He is so fond of palindromes that if you give him any string, he will try to break it into continous palindromes.
As Feluda is a smart boy, he will do try to break the string into minimum no of such continuous palindromes. You have to help Prabhu. Find out the answer for the problem if he is given a string s.
T : number of test cases (T <= 100)
next T lines contain a string s (length of s <= 2000)
For every test case print one line having answer as given in the problem statement.
nice problem:) AC in one go
Finally solved it!!!
Top down dp- tle! bottom up - ac
Every test case is running on my code..:( still getting WA
@satyajit ganguly: For ababbacababbad, you get aba + b + bacab + abba + d = 5.
explain the ouput for: ababbd
please explain the output for 3rd case...how did you get 5? what are the palindromes?
Nice problem :)