132472025-01-07 10:48:53Leventusz09Hőségriadó (50 pont)cpp17Wrong answer 10/5021ms508 KiB
#include <iostream>
#include <vector>

using namespace std;



int main(){
    int N, K, L, F;
    cin >> N >> K >> L >> F;

    int g = 0,
        l = 0,
        o = 0;

    bool n = 0;

    for(int i=0, c; i<N; i++){
        cin >> c;
        if(c >= F) g++;
        else g = 0;

        if(c < F) l++;
        else l = 0;

        if(g == K && !n){
            o++;
            n = 1;
        }
        if(l == K && n){
            n = 0;
        }
    }
    cout << o << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base10/50
1Accepted0/01ms508 KiB
2Wrong answer0/021ms316 KiB
3Accepted2/21ms316 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Accepted2/21ms316 KiB
8Wrong answer0/41ms388 KiB
9Wrong answer0/48ms396 KiB
10Wrong answer0/410ms396 KiB
11Wrong answer0/414ms400 KiB
12Wrong answer0/410ms400 KiB
13Wrong answer0/417ms500 KiB
14Wrong answer0/42ms316 KiB
15Wrong answer0/419ms400 KiB
16Wrong answer0/419ms400 KiB
17Wrong answer0/419ms404 KiB