215462026-01-13 13:19:24KSziliHőségriadó (50 pont)cpp17Wrong answer 4/5021ms540 KiB
#include <iostream>


using namespace std;

int main()
{
    /*int n, k, x=0;
    cin>>n;
    cin>>k;
    int a[100000];
    for(int i=0; i<n; i++)
    {
        cin>>a[i];
        if(a[i]==1)
        {
            x++;
        }
    }
    if(x>=k)
        cout<<(x-(k-2))*(x-(k-1))/2;
    else cout<<0;*/


    int a, k, n, l, f, db1=0, db2=0, sz=0;
    cin>>n;
    cin>>k;
    cin>>l;
    cin>>f;
    for(int i=0; i<n; i++)
    {
        cin>>a;
        if(a>f)
        {
            db1++;
            db2=0;
        }
        if(a<f)
        {
            db2++;
            db1=0;
        }
        if(db1==2 && db2<2)
            sz++;
    }
    cout<<sz;


/*10
2
2
30
25
25
31
31
21
31
21
31
31*/








    return 0;
}

SubtaskSumTestVerdictTimeMemory
base4/50
1Accepted0/01ms316 KiB
2Wrong answer0/021ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Wrong answer0/21ms392 KiB
8Wrong answer0/41ms316 KiB
9Wrong answer0/48ms396 KiB
10Wrong answer0/412ms400 KiB
11Wrong answer0/413ms400 KiB
12Wrong answer0/410ms404 KiB
13Wrong answer0/417ms316 KiB
14Wrong answer0/42ms540 KiB
15Wrong answer0/419ms396 KiB
16Wrong answer0/419ms400 KiB
17Wrong answer0/419ms396 KiB