124602024-12-18 09:40:02feheristvanHőségriadó (50 pont)cpp17Wrong answer 8/5023ms536 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n, k, l, f;
    cin >> n >> k >> l >> f;
    int folotte = 0, alatta = 0, x;
    int hosegriado = 0;
    for(int i = 0; i < n; i ++){
        cin >> x;
        if(x > f){
            alatta = 0;
            folotte ++;
        }

        else if(x < f){
            alatta ++;
        }
        if(alatta == l){
            folotte = 0;
            alatta = 0;
        }
        if(folotte == k && alatta == 0){
            hosegriado ++;
        }
    }
    cout << hosegriado;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base8/50
1Accepted0/01ms320 KiB
2Wrong answer0/023ms404 KiB
3Accepted2/21ms320 KiB
4Accepted2/21ms320 KiB
5Accepted2/21ms320 KiB
6Wrong answer0/21ms320 KiB
7Accepted2/21ms320 KiB
8Wrong answer0/42ms320 KiB
9Wrong answer0/49ms320 KiB
10Wrong answer0/412ms320 KiB
11Wrong answer0/414ms404 KiB
12Wrong answer0/412ms536 KiB
13Wrong answer0/417ms404 KiB
14Wrong answer0/42ms404 KiB
15Wrong answer0/421ms404 KiB
16Wrong answer0/420ms396 KiB
17Wrong answer0/420ms404 KiB