14932022-11-21 13:55:00teodorbatkaiMicimackó (40 pont)cpp11Wrong answer 22/403ms3620 KiB
#include <bits/stdc++.h>

using namespace std;

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

    if(k - n <= 0){
        if(v-(m-n)){
            cout << v-(m-n) << endl;
        }
        else{
            cout << 0 << endl;
        }
    }
    else{
        if((k+v)-(n+m) > 0){
            cout << (k+v)-(n+m) << endl;
        }
        else{
            cout << 0 << endl;
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base22/40
1Accepted0/03ms1744 KiB
2Accepted0/02ms1908 KiB
3Wrong answer0/22ms2120 KiB
4Wrong answer0/22ms2324 KiB
5Accepted2/22ms2544 KiB
6Accepted2/22ms2464 KiB
7Accepted2/22ms2596 KiB
8Accepted2/22ms2840 KiB
9Accepted2/22ms2876 KiB
10Wrong answer0/22ms3020 KiB
11Accepted2/22ms2960 KiB
12Accepted2/22ms3084 KiB
13Wrong answer0/22ms3332 KiB
14Accepted2/22ms3368 KiB
15Wrong answer0/22ms3368 KiB
16Wrong answer0/22ms3524 KiB
17Wrong answer0/22ms3524 KiB
18Wrong answer0/22ms3500 KiB
19Accepted2/22ms3488 KiB
20Accepted2/22ms3484 KiB
21Accepted2/22ms3612 KiB
22Wrong answer0/22ms3620 KiB