83132024-01-14 17:08:43TuruTamasHőségriadó (50 pont)cpp17Wrong answer 2/5024ms4120 KiB
#include <iostream>

using namespace std;
typedef long long ll;

ll N, K, V, a, r;

int main()
{
    cin >> N >> K;
    for (ll n = 0; n < N; n++) {
        cin >> a;
        V += a == 1;
    }
    for (ll i = 0; i < V-K+1; i++) {
        r += V - K - i + 1;
    }
    cout << r << endl;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Wrong answer0/03ms1872 KiB
2Wrong answer0/024ms2068 KiB
3Wrong answer0/23ms2284 KiB
4Wrong answer0/23ms2524 KiB
5Wrong answer0/23ms2636 KiB
6Accepted2/23ms2724 KiB
7Wrong answer0/23ms2996 KiB
8Wrong answer0/43ms3064 KiB
9Wrong answer0/410ms3180 KiB
10Wrong answer0/413ms3388 KiB
11Wrong answer0/414ms3480 KiB
12Wrong answer0/413ms3600 KiB
13Wrong answer0/419ms3688 KiB
14Wrong answer0/44ms3948 KiB
15Wrong answer0/421ms4120 KiB
16Wrong answer0/421ms3876 KiB
17Wrong answer0/423ms3876 KiB