136322025-01-08 11:43:24EsVagyVirágos rét (50 pont)cpp17Wrong answer 5/5018ms500 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, k;
    cin >> n >> k;
    int count = 0;
    for (int i = 0; i < n; i++) {
        bool next;
        cin >> next;
        count += next;
    }

    long long ans = 1;
    for (int i = count - k + 1; i > 0; i--) {
        ans *= i;
    }

    cout << ans << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/50
1Accepted0/01ms316 KiB
2Wrong answer0/01ms500 KiB
3Wrong answer0/018ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/31ms500 KiB
8Accepted3/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/31ms316 KiB
14Accepted2/217ms392 KiB
15Wrong answer0/217ms400 KiB
16Wrong answer0/318ms316 KiB
17Wrong answer0/317ms392 KiB
18Wrong answer0/318ms316 KiB
19Wrong answer0/318ms400 KiB
20Wrong answer0/318ms316 KiB
21Wrong answer0/318ms400 KiB
22Wrong answer0/318ms396 KiB