84242024-01-15 22:16:54eokorHőségriadó (50 pont)cpp17Wrong answer 6/5024ms4772 KiB
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    long long int n,k,l,h,x;
    bool pont = true;
    long long int db=0,akt=0,aktl=0;
    cin>>n>>k>>l>>h;
    vector <int> a;


    for(long long int i=0;i<n;i++)
        {
            cin>>x;
            a.push_back(x);
        }

    for(long long int i=0;i<n;i++)
    {
        if(pont){
                if(a[i]>=h)
                    akt++;
                else akt=0;

                if(akt==k)
                {
                    db++;
                    akt=0;
                }

            }

    }
    cout<<db;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base6/50
1Accepted0/03ms1968 KiB
2Wrong answer0/024ms3308 KiB
3Wrong answer0/23ms2316 KiB
4Accepted2/23ms2396 KiB
5Accepted2/23ms2552 KiB
6Accepted2/23ms2764 KiB
7Wrong answer0/23ms2864 KiB
8Wrong answer0/43ms3108 KiB
9Wrong answer0/410ms3772 KiB
10Wrong answer0/414ms3928 KiB
11Wrong answer0/416ms4088 KiB
12Wrong answer0/414ms4092 KiB
13Wrong answer0/419ms4772 KiB
14Wrong answer0/44ms3664 KiB
15Wrong answer0/423ms4700 KiB
16Wrong answer0/423ms4700 KiB
17Wrong answer0/423ms4704 KiB