242072026-02-06 12:46:31domdiridomdidomHőségriadó (50 pont)cpp17Wrong answer 6/5021ms508 KiB
#include <iostream>

int main() {
   int n, k, l, f;
   std::cin >> n >> k >> l >> f;
   int nr = 0, curStart = -1, curEnd = -1, prev;
   for(int i = 0; i < n; i++) {
      int x;
      std::cin >> x;
      if(x <= f && i - curEnd + 1 == l) {
         curStart = -1;
         curEnd = -1;
      }
      if(x > f) {
         if(curStart == -1) {
            curStart = i;
            curEnd = i;
         }
         else
            curEnd++;
         if(curEnd - curStart + 1 == k)
            nr++;
      }
      
   }
   std::cout << nr;
}
SubtaskSumTestVerdictTimeMemory
base6/50
1Accepted0/01ms508 KiB
2Wrong answer0/021ms316 KiB
3Wrong answer0/21ms508 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms352 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/41ms500 KiB
9Wrong answer0/48ms396 KiB
10Wrong answer0/412ms400 KiB
11Wrong answer0/414ms404 KiB
12Wrong answer0/412ms316 KiB
13Wrong answer0/417ms396 KiB
14Wrong answer0/43ms316 KiB
15Wrong answer0/420ms412 KiB
16Wrong answer0/420ms316 KiB
17Wrong answer0/420ms316 KiB