83792024-01-15 11:08:57antiVirágos rét (50 pont)cpp14Wrong answer 0/503ms4228 KiB
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    ifstream fin("be3.txt");
    int n, k;
    fin >> n >> k;
    int hany = 0;
    for(int i=0; i<n; i++){
        int h;
        fin >> h;
        if(h==1){
            hany++;
        }
    }
    long long int h = (hany-k+1)*(hany-k+2)/2;
    cout << h;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms2080 KiB
2Wrong answer0/03ms2268 KiB
3Wrong answer0/03ms2268 KiB
4Wrong answer0/23ms2704 KiB
5Wrong answer0/23ms2800 KiB
6Wrong answer0/23ms2760 KiB
7Wrong answer0/33ms2852 KiB
8Wrong answer0/33ms3060 KiB
9Wrong answer0/33ms3148 KiB
10Wrong answer0/23ms3144 KiB
11Wrong answer0/33ms3200 KiB
12Wrong answer0/23ms3420 KiB
13Wrong answer0/33ms3540 KiB
14Wrong answer0/23ms3664 KiB
15Wrong answer0/23ms3760 KiB
16Wrong answer0/33ms3816 KiB
17Wrong answer0/33ms3940 KiB
18Wrong answer0/33ms4024 KiB
19Wrong answer0/33ms3984 KiB
20Wrong answer0/33ms3988 KiB
21Wrong answer0/32ms3988 KiB
22Wrong answer0/33ms4228 KiB