90502024-02-13 09:00:20PedriVirágos rét (50 pont)cpp17Wrong answer 5/5019ms3876 KiB
#include <iostream>
#include <fstream>

using namespace std;
int n, m;


int main()
{
    ifstream f("be.in");
    cin>>n>>m;
    int k=0;
    for(int i=1;i<=n;i++){
        int x;
        cin>>x;
        if(x==1){k++;}
    }
    int s=0;
    for(int i=1;i<=k-2;i++){
        for(int j=i+2;j<=k;j++){
            s++;
        }
    }
    cout<<s;




    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/50
1Accepted0/03ms1724 KiB
2Accepted0/03ms1960 KiB
3Wrong answer0/019ms2168 KiB
4Wrong answer0/23ms2696 KiB
5Accepted2/23ms2776 KiB
6Wrong answer0/23ms2788 KiB
7Wrong answer0/33ms2864 KiB
8Accepted3/33ms2980 KiB
9Wrong answer0/33ms3024 KiB
10Wrong answer0/23ms3260 KiB
11Wrong answer0/33ms3444 KiB
12Wrong answer0/23ms3448 KiB
13Wrong answer0/33ms3576 KiB
14Wrong answer0/218ms3696 KiB
15Wrong answer0/218ms3656 KiB
16Wrong answer0/319ms3644 KiB
17Wrong answer0/318ms3636 KiB
18Wrong answer0/319ms3628 KiB
19Wrong answer0/319ms3628 KiB
20Wrong answer0/319ms3876 KiB
21Wrong answer0/319ms3868 KiB
22Wrong answer0/319ms3864 KiB