#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 5e5 + 10, M = 2e6 + 10, mod = 998244353, INF = 0x3ffffffff, LOG = 23;
const long double PI = 3.141592653589793;
int n, m, l, r;
string s;
/*
int e[M], h[N], ne[M], idx;
inline void add(int u, int v){
e[idx] = v, ne[idx] = h[u], h[u] = idx ++;
}
*/
int qpow(int x, int d){
int res = 1;
while(d){
if(d & 1){
res *= x;
}
x = (x * x) % mod;
d >>= 1;
}
return res;
}
int __mod(int a){
return ((a % mod) + mod) % mod;
}
int pre[N][30];
signed main(){
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
// memset(h, -1, sizeof h);
cin >> n >> l >> r >> s;
int ans = 0;
for(int i=1;i<=s.length();i++){
for(int j=0;j<26;j++){
pre[i][j] = pre[i-1][j];
}
pre[i][s[i-1]-'a'] ++;
if(i > l){
int c = s[i-1] - 'a';
int num = pre[i-l][c] - pre[max(i-r-1, 0ll)][c];
// if(num) cout << "pos : " << i << "\n";
ans += num;
}
}
cout << ans << "\n";
return 0;
}
./Main.cpp: In function 'int main()':
./Main.cpp:40:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | for(int i=1;i<=s.length();i++){
| ~^~~~~~~~~~~~