中心扩展法。 typedef pair<int, int> PII; #define x first #define y second class Solution { public: PII expand(const string& A, int left, int right) { while (left >= 0 && right < A.length() && A[left] == A[right]) -- left, ++ right; return make_pair(left + 1, right - 1); } i...