Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 方法一(暴力解法): 就上暴力加些剪枝. 枚举回文串的长度,从最长的开始,寻找是否有当前长度的回文串. 如果找到,直接弹出循环,没找到就减小回文串的长…