马拉车算法注释已经写下大致思路 class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A string字符串 * @return int整型 */ int getLongestPalindrome(string s) { // write code here int n = s.size(); vector<int> d1(n, 0), d2(n, 0); int a1 = 0, a2 = 0; // 考虑以i为中心,半径为d1[i]的奇数长度回文串 for(int i = ...