O（n^2）dp solution to Longest Palindromic Substring