求一个长度为 nnn 包含大小写字母的字符串有多少个连续子串经过重新排列之后是一个回文串,n≤3×105n \le 3\times10^5n≤3×105。
请问有没有复杂度比 O(n∣Σ∣logn)O(n\lvert\Sigma\rvert \log n)O(n∣Σ∣logn) 更优的做法?使用哈希可以做到 O(n∣Σ∣)O(n\lvert\Sigma\rvert)O(n∣Σ∣),但是过不去(