#include<bits/stdc++.h> #define int long long usingnamespace std;
constint N = 1e5 + 66;
int n, h, b, e; int c[N], q[N], res[N];
signedmain() { int i, j, k; while (scanf ("%lld%lld%lld%lld", &n, &h, &b, &e) != EOF) { for (i = 1; i <= n; ++ i) c[i] = read(); memset(q, 0, sizeof q), memset(res, 0, sizeof res); int l = 1, r = 0; for (i = 1; i <= n; ++ i) { while (l <= r && q[l] + h <= i) ++ l; while (l <= r && c[q[r]] >= c[i]) -- r; q[++ r] = i; ++ res[q[l]]; } for (i = b; i <= e; ++ i) put(res[i]); puts(""); } return0; }