132832025-01-07 12:07:18mateHőségriadó (50 pont)cpp17Wrong answer 6/5021ms756 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 if(v[i] < f){
			lc++;
			kc = 0;
		}
		if(lc >= l){
			kc = 0;
		}
		if(kc >= k){
			ksum++;
		}
		
		
	}
	cout << ksum;
	
	
	
}
SubtaskSumTestVerdictTimeMemory
base6/50
1Accepted0/01ms316 KiB
2Wrong answer0/021ms564 KiB
3Wrong answer0/21ms500 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/41ms316 KiB
9Wrong answer0/48ms752 KiB
10Wrong answer0/410ms564 KiB
11Wrong answer0/414ms648 KiB
12Wrong answer0/412ms756 KiB
13Wrong answer0/417ms720 KiB
14Wrong answer0/42ms316 KiB
15Wrong answer0/420ms564 KiB
16Wrong answer0/420ms644 KiB
17Wrong answer0/420ms564 KiB