思路 滑动窗口 + 前缀和 过程 代码 #include <iostream> #include <string> #include <cstring> using namespace std; const int N = 2e5 + 10; int n, l, r; string s; long long find(int x) { int l = 0, r = 0, kind = 0, h[26] = { 0 }; long long ans = 0; while(r < n) { if...