14992022-11-21 14:06:57teodorbatkaiMicimackó (40 pont)cpp17Wrong answer 12/403ms3352 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){
    int n, m, k, v;
    cin >> n >> m >> k >> v;

    for(int i = 1; i <= n+m; i++){
        if(i <= n){
            k--;
        }
        else{
            if(k < 0) k = 0;
            v += k;
            k = 0;
            v--;
        }
    }
    if(v < 0) v = 0;
    cout << v << endl;
}
SubtaskSumTestVerdictTimeMemory
base12/40
1Wrong answer0/03ms2004 KiB
2Accepted0/02ms2156 KiB
3Wrong answer0/22ms2304 KiB
4Wrong answer0/22ms2380 KiB
5Accepted2/22ms2628 KiB
6Wrong answer0/22ms2588 KiB
7Wrong answer0/22ms2720 KiB
8Accepted2/22ms2872 KiB
9Wrong answer0/22ms2936 KiB
10Wrong answer0/22ms3044 KiB
11Accepted2/22ms3044 KiB
12Accepted2/22ms3180 KiB
13Wrong answer0/22ms3256 KiB
14Wrong answer0/22ms3352 KiB
15Accepted2/22ms3324 KiB
16Wrong answer0/22ms3168 KiB
17Wrong answer0/22ms3168 KiB
18Wrong answer0/22ms3164 KiB
19Accepted2/22ms3168 KiB
20Wrong answer0/22ms3164 KiB
21Wrong answer0/22ms3168 KiB
22Wrong answer0/22ms3300 KiB