B. Prison Transfer

http://codeforces.com/contest/427/problem/B

#include <iostream>

#include <fstream>
using namespace std;
int n,t,c,k,i,d,p,komb;




int main(){
cin>>n>>t>>c;
for(i=1;i<=n;i++){
cin>>k;
if(k<=t) p++;
if(k>t) p=0;
if(p>=c) komb++;


}
cout<<komb;
return 0;
    }

你可能感兴趣的:(B. Prison Transfer)