132792025-01-07 11:56:17mateHőségriadó (50 pont)cpp17Wrong answer 6/5021ms768 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,l,k,f;
	cin >> n >> k >> l >> f;
	vector <int> v(n);
	int kc=0,lc=0;
	int ksum=0,lsum=0;
	for (int i = 0; i < n; i++){
		cin >> v[i];
		if(v[i] >= f){
			kc++;
			lc = 0; 
		}else{
			lc++;
			kc = 0;
		}
		if(kc >= k){
			ksum++;
		}
		if(lc >= l){
			lsum++;
		}
		
	}
	cout << ksum;
	
	
	
}
SubtaskSumTestVerdictTimeMemory
base6/50
1Accepted0/01ms316 KiB
2Wrong answer0/021ms564 KiB
3Wrong answer0/21ms316 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/41ms316 KiB
9Wrong answer0/48ms572 KiB
10Wrong answer0/412ms564 KiB
11Wrong answer0/414ms564 KiB
12Wrong answer0/412ms608 KiB
13Wrong answer0/417ms604 KiB
14Wrong answer0/42ms500 KiB
15Wrong answer0/419ms684 KiB
16Wrong answer0/419ms768 KiB
17Wrong answer0/419ms564 KiB