遍历解法 class Solution { public: inline int numMax(int a,int b){ return a>b ? a : b; } int getLongestPalindrome(string A, int n) { // write code here int ans=1, strLength = A.size(); for(int i=0;i<strLength;i++){ for(int j=i+1; j<strLength;j++){ if(A[i]==A[j]){ for(int a=i,b=j;a<=b&&...