110262024-06-21 11:54:22CsongiHőségriadó (50 pont)cpp17Wrong answer 2/5025ms1376 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, k, l, f;
    cin >> n >> k >> l >> f;
    vector<int> atlag;
    int temp = 0;
    bool riado = false;
    int riadok = 0;
    int meleg = 0;
    int hideg = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> temp;
        atlag.push_back(temp);
        if (temp > f)
        {
            meleg++;
            if (meleg == k)
            {               
                riadok++;
                riado = true;                                 
            }
        }
        else
        {
            hideg++;
            if (hideg == l)
            {
                riado = false;
                meleg = 0;
            }
        }     
    }
    cout << riadok << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Accepted0/03ms484 KiB
2Wrong answer0/025ms1300 KiB
3Wrong answer0/23ms632 KiB
4Wrong answer0/23ms760 KiB
5Accepted2/23ms228 KiB
6Wrong answer0/23ms484 KiB
7Wrong answer0/23ms360 KiB
8Wrong answer0/43ms356 KiB
9Wrong answer0/412ms1152 KiB
10Wrong answer0/414ms868 KiB
11Wrong answer0/416ms912 KiB
12Wrong answer0/414ms1024 KiB
13Wrong answer0/420ms1292 KiB
14Wrong answer0/44ms556 KiB
15Wrong answer0/424ms1376 KiB
16Wrong answer0/423ms1252 KiB
17Wrong answer0/424ms1320 KiB