114062024-09-13 09:41:57szabelrVirágos rét (50 pont)cpp17Wrong answer 4/5020ms1272 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]==1)
            egyesek++;
    }
    //cout<<egyesek;
    if(k>egyesek)
        cout<<"0";
    else {
        cout<<(egyesek-k)*(egyesek-k+1);
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/50
1Accepted0/02ms360 KiB
2Accepted0/03ms416 KiB
3Wrong answer0/020ms1272 KiB
4Wrong answer0/23ms488 KiB
5Accepted2/22ms376 KiB
6Accepted2/22ms232 KiB
7Wrong answer0/33ms360 KiB
8Wrong answer0/32ms360 KiB
9Wrong answer0/33ms632 KiB
10Wrong answer0/23ms360 KiB
11Wrong answer0/33ms360 KiB
12Wrong answer0/23ms504 KiB
13Wrong answer0/32ms232 KiB
14Wrong answer0/218ms1128 KiB
15Wrong answer0/218ms1148 KiB
16Wrong answer0/319ms1000 KiB
17Wrong answer0/319ms1128 KiB
18Wrong answer0/320ms924 KiB
19Wrong answer0/319ms1048 KiB
20Wrong answer0/320ms1152 KiB
21Wrong answer0/319ms1128 KiB
22Wrong answer0/319ms1052 KiB