144192025-01-10 18:21:34JoKoBoVirágos rét (50 pont)cpp17Wrong answer 7/5018ms564 KiB
#include <bits/stdc++.h>
using namespace std;

bool ok(int x, int y) {
    return x > y;
}

int main(){
    int ret = 0;
    int k = 0;
    int viragos = 0;
    long long result = 0; //int-en nem mukodott...
    cin >> ret >> k;
    int beker = 0;
    for(int i = 0; i < ret; i++) {
        cin >> beker;
        viragos += beker;
    }
    if(viragos < k) {
        cout << 0;
        return 0; // Game Over
    }
    for(int i = 1; i <= viragos; i++) {
        result += ok(0, viragos - k - i + 2);
    }
    cout << result;
    //Gondolom, ez mar jo...
}
SubtaskSumTestVerdictTimeMemory
base7/50
1Wrong answer0/01ms512 KiB
2Accepted0/01ms508 KiB
3Wrong answer0/017ms396 KiB
4Wrong answer0/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms508 KiB
7Wrong answer0/31ms500 KiB
8Accepted3/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/31ms556 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/31ms316 KiB
14Wrong answer0/217ms400 KiB
15Wrong answer0/217ms508 KiB
16Wrong answer0/318ms564 KiB
17Wrong answer0/317ms316 KiB
18Wrong answer0/318ms400 KiB
19Wrong answer0/317ms396 KiB
20Wrong answer0/317ms396 KiB
21Wrong answer0/318ms400 KiB
22Wrong answer0/317ms396 KiB