#include #include #include using namespace std; typedef long long ll; ll a[200005],b[200005],sum[200005]; int main() { ll T; scanf("%lld",&T); while(T--) { memset(b,0,sizeof(b)); memset(sum,0,sizeof(sum)); ll n,m,k; scanf("%lld%lld%lld",&n,&m,&k); for(ll i=1;i<=n;i++) { scanf("%lld",&a[i]); if(a[i]>=m)b[i]=1; else b[i]=0; } ll ans=0; int cnt = 0; int l = 1, r = 1; for (l=1;l<=n;l++){ while (r<=n&&cnt