114052024-09-13 09:39:34szabelrVirágos rét (50 pont)cpp17Wrong answer 0/5019ms1400 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,k,egyesek=0;
    long long a[100000];
    cin>>n>>k;
    for(int i=1; i<=n; i++){
        cin>>a[i];
        if(a[i]==0)
            egyesek++;
    }
    if(k>egyesek)
        cout<<"0";
    else {
        cout<<(egyesek-k)*(egyesek-k+1);
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Accepted0/03ms504 KiB
2Wrong answer0/03ms360 KiB
3Wrong answer0/019ms1384 KiB
4Wrong answer0/23ms360 KiB
5Wrong answer0/23ms452 KiB
6Wrong answer0/23ms520 KiB
7Wrong answer0/33ms496 KiB
8Wrong answer0/33ms544 KiB
9Wrong answer0/32ms492 KiB
10Wrong answer0/23ms500 KiB
11Wrong answer0/33ms544 KiB
12Wrong answer0/23ms632 KiB
13Wrong answer0/33ms360 KiB
14Wrong answer0/218ms1256 KiB
15Wrong answer0/218ms1324 KiB
16Wrong answer0/319ms1184 KiB
17Wrong answer0/318ms1204 KiB
18Wrong answer0/319ms1204 KiB
19Wrong answer0/319ms1200 KiB
20Wrong answer0/318ms1400 KiB
21Wrong answer0/319ms1192 KiB
22Wrong answer0/318ms1272 KiB