120182024-11-25 14:22:27mártonágnesHőségriadó (50 pont)cpp17Wrong answer 4/5021ms712 KiB
#include <iostream>

using namespace std;

int main()
{
    int L, K, F, dbn=0, dbk=0, dbhr=0;
    long N;
    cin >>N>>K>>L>>F;
    int A[N];
    for (int i=0; i<=N-1; i++)
        cin >>A[i];
    for (int j=0; j<=N-1; j++)
    {
        if (A[j]>F)
        {
            dbn++;
            if (dbn==K)
            {
                dbhr++;
            }

        }
        else if (A[j]<F && dbn>=K)
        {
            dbk++;
            if (dbk==K)
            {
                dbn=0;
            }
        }
    }
    cout << dbhr;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/50
1Accepted0/01ms500 KiB
2Wrong answer0/021ms568 KiB
3Wrong answer0/21ms320 KiB
4Wrong answer0/21ms500 KiB
5Accepted2/21ms320 KiB
6Wrong answer0/21ms320 KiB
7Accepted2/21ms392 KiB
8Wrong answer0/41ms408 KiB
9Wrong answer0/48ms508 KiB
10Wrong answer0/410ms568 KiB
11Wrong answer0/414ms568 KiB
12Wrong answer0/410ms552 KiB
13Wrong answer0/417ms712 KiB
14Wrong answer0/42ms320 KiB
15Wrong answer0/419ms520 KiB
16Wrong answer0/420ms520 KiB
17Wrong answer0/419ms604 KiB