114182024-09-13 10:43:26madvirHőségriadó (50 pont)cpp17Wrong answer 26/5024ms504 KiB
#include <iostream>
#include <set>

using namespace std;
long long n,k,l,f, temp;
long long meleg=0, hideg=0, riado=0, card=0;

int main()
{
    cin >>n >>k >>l >> f;
    for(int i=0; i<n; i++) {
        cin >> temp;
        if(temp>f) {
            hideg=0;
            meleg++;
            if(meleg==k && riado==0) {
                riado=1;
                card++;
            }
        }
        else {
            meleg=0;
            if(temp<f) {
                hideg++;
                if(hideg==l && riado==1)  {
                    riado=0;
                }
            }
        }
    }
    cout<< card;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base26/50
1Accepted0/03ms360 KiB
2Wrong answer0/024ms504 KiB
3Accepted2/23ms504 KiB
4Accepted2/23ms384 KiB
5Accepted2/22ms376 KiB
6Accepted2/22ms232 KiB
7Accepted2/22ms360 KiB
8Accepted4/43ms504 KiB
9Accepted4/410ms360 KiB
10Accepted4/414ms256 KiB
11Accepted4/416ms504 KiB
12Wrong answer0/413ms232 KiB
13Wrong answer0/419ms360 KiB
14Wrong answer0/44ms360 KiB
15Wrong answer0/423ms504 KiB
16Wrong answer0/423ms376 KiB
17Wrong answer0/423ms504 KiB