90512024-02-13 09:01:15PedriVirágos rét (50 pont)cpp17Wrong answer 5/5019ms4244 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++;}
    }
    long long 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/03ms1680 KiB
2Accepted0/03ms1848 KiB
3Wrong answer0/019ms2056 KiB
4Wrong answer0/23ms2272 KiB
5Accepted2/23ms2360 KiB
6Wrong answer0/23ms2484 KiB
7Wrong answer0/33ms2728 KiB
8Accepted3/33ms2948 KiB
9Wrong answer0/33ms3060 KiB
10Wrong answer0/23ms3168 KiB
11Wrong answer0/33ms3384 KiB
12Wrong answer0/23ms3472 KiB
13Wrong answer0/33ms3596 KiB
14Wrong answer0/218ms3564 KiB
15Wrong answer0/218ms3828 KiB
16Wrong answer0/319ms3892 KiB
17Wrong answer0/318ms4004 KiB
18Wrong answer0/319ms3888 KiB
19Wrong answer0/319ms3892 KiB
20Wrong answer0/319ms3900 KiB
21Wrong answer0/319ms4144 KiB
22Wrong answer0/319ms4244 KiB