124612024-12-18 09:43:03feheristvanHőségriadó (50 pont)cpp17Wrong answer 2/5021ms564 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 ++;
            folotte = 0;
        }
        if(alatta == l){
            folotte = 0;
            alatta = 0;
        }
        if(folotte == k && alatta != 0){
            hosegriado ++;
        }
    }
    cout << hosegriado;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Wrong answer0/01ms320 KiB
2Wrong answer0/021ms564 KiB
3Wrong answer0/21ms320 KiB
4Wrong answer0/21ms548 KiB
5Wrong answer0/21ms320 KiB
6Accepted2/21ms320 KiB
7Wrong answer0/21ms320 KiB
8Wrong answer0/42ms320 KiB
9Wrong answer0/48ms404 KiB
10Wrong answer0/412ms512 KiB
11Wrong answer0/414ms404 KiB
12Wrong answer0/412ms500 KiB
13Wrong answer0/417ms320 KiB
14Wrong answer0/42ms320 KiB
15Wrong answer0/420ms396 KiB
16Wrong answer0/420ms400 KiB
17Wrong answer0/420ms400 KiB