124582024-12-18 09:35:24feheristvanHőségriadó (50 pont)cpp17Wrong answer 8/5023ms548 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)
            folotte ++;
        else if(x < f){
            alatta ++;
            folotte = 0;
        }
        if(alatta == l){
            folotte = 0;
            alatta = 0;
        }
        if(folotte == k){
            hosegriado ++;
        }
    }
    cout << hosegriado;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base8/50
1Accepted0/01ms320 KiB
2Wrong answer0/023ms500 KiB
3Accepted2/21ms320 KiB
4Accepted2/21ms500 KiB
5Accepted2/21ms320 KiB
6Accepted2/21ms392 KiB
7Wrong answer0/21ms320 KiB
8Wrong answer0/41ms508 KiB
9Wrong answer0/48ms320 KiB
10Wrong answer0/410ms404 KiB
11Wrong answer0/413ms404 KiB
12Wrong answer0/412ms548 KiB
13Wrong answer0/417ms320 KiB
14Wrong answer0/42ms320 KiB
15Wrong answer0/420ms508 KiB
16Wrong answer0/419ms404 KiB
17Wrong answer0/419ms400 KiB