120302024-11-25 15:27:56mártonágnesVirágos rét (50 pont)cpp17Wrong answer 4/50298ms712 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, K, fele=0;
    cin >> N >> K;
    int A[N-1];
    for (int i=0; i<=N-1; i++)
    {
        cin >> A[i];
        if (A[i]==1)
        {
            for (int j=i+K; j<=N; j++)
            {
                if (A[j]==1) fele++;
            }
        }

    }
    cout << fele;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/50
1Wrong answer0/01ms320 KiB
2Accepted0/01ms320 KiB
3Time limit exceeded0/0282ms320 KiB
4Wrong answer0/21ms320 KiB
5Accepted2/21ms320 KiB
6Accepted2/21ms320 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/21ms320 KiB
11Wrong answer0/31ms400 KiB
12Wrong answer0/21ms388 KiB
13Wrong answer0/31ms320 KiB
14Wrong answer0/217ms576 KiB
15Time limit exceeded0/2277ms512 KiB
16Time limit exceeded0/3279ms320 KiB
17Time limit exceeded0/3287ms408 KiB
18Time limit exceeded0/3286ms508 KiB
19Wrong answer0/365ms712 KiB
20Time limit exceeded0/3252ms668 KiB
21Time limit exceeded0/3298ms320 KiB
22Time limit exceeded0/3284ms320 KiB