144112025-01-10 18:15:06duongtamas01Virágos rét (50 pont)cpp17Wrong answer 3/5018ms808 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int k;
    cin >> k;
    vector < int > t(n);
    int egyesek = 0;

    for(int i = 0; i < n; i++){
        cin >> t[i];
        if(t[i] == 1){
            egyesek++;
        }
    }
    int ans = 1;
    for(int i = 2; i < egyesek - 1; i++){
        ans += i;
    }
    cout << ans;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/01ms508 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/017ms564 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/31ms316 KiB
8Accepted3/31ms316 KiB
9Wrong answer0/31ms508 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/31ms316 KiB
14Wrong answer0/217ms756 KiB
15Wrong answer0/217ms564 KiB
16Wrong answer0/317ms564 KiB
17Wrong answer0/317ms568 KiB
18Wrong answer0/318ms564 KiB
19Wrong answer0/317ms564 KiB
20Wrong answer0/317ms564 KiB
21Wrong answer0/317ms808 KiB
22Wrong answer0/317ms800 KiB