14942022-11-21 13:55:55teodorbatkaiMicimackó (40 pont)cpp11Wrong answer 24/403ms4288 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) > 0){
            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
base24/40
1Accepted0/03ms1872 KiB
2Accepted0/02ms2124 KiB
3Wrong answer0/22ms2332 KiB
4Wrong answer0/22ms2564 KiB
5Accepted2/22ms2760 KiB
6Accepted2/22ms3000 KiB
7Accepted2/22ms3168 KiB
8Accepted2/22ms3268 KiB
9Accepted2/22ms3452 KiB
10Wrong answer0/22ms3620 KiB
11Accepted2/22ms3800 KiB
12Accepted2/22ms3912 KiB
13Wrong answer0/22ms4004 KiB
14Accepted2/22ms4120 KiB
15Accepted2/22ms4080 KiB
16Wrong answer0/22ms4076 KiB
17Wrong answer0/22ms4204 KiB
18Wrong answer0/22ms4208 KiB
19Accepted2/22ms4284 KiB
20Accepted2/22ms4280 KiB
21Accepted2/22ms4288 KiB
22Wrong answer0/22ms4284 KiB