152312025-02-17 12:01:48MrkzVirágos rét (50 pont)cpp17Wrong answer 5/50300ms1092 KiB
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
    int N,K,megoldas=0,db=0;
    cin>>N>>K;
    int Ret[N],jok[N];
    for(int i=1;i<=N;i++)
        cin>>Ret[i];
    for(int i=1;i<=N;i++){
        if(Ret[i]==1)
            jok[++db]=i;
    }
    for(int i=1;i<=db;i++){
        int db2=0;
        for(int j=i+1;j<=db;j++){
            db2++;
            if(db2>1)
                megoldas++;
        }
    }
    cout<<megoldas<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/50
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Wrong answer0/081ms820 KiB
4Wrong answer0/21ms316 KiB
5Accepted2/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/31ms316 KiB
8Accepted3/31ms320 KiB
9Wrong answer0/31ms364 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/31ms344 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/31ms508 KiB
14Time limit exceeded0/2300ms1092 KiB
15Time limit exceeded0/2300ms1076 KiB
16Time limit exceeded0/3300ms784 KiB
17Wrong answer0/3152ms760 KiB
18Time limit exceeded0/3287ms820 KiB
19Wrong answer0/318ms764 KiB
20Time limit exceeded0/3289ms1076 KiB
21Time limit exceeded0/3280ms920 KiB
22Time limit exceeded0/3300ms1076 KiB