17502022-12-02 19:00:46kdbMicimackó (40 pont)cpp11Accepted 40/403ms3744 KiB
#include <iostream>
#include <vector>
#include <map>
using namespace std;
int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);

    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int n = 0;
    if (c > a) d += c - a;
    if (d > b - a) n += d - b + a;
    cout << n << endl;
    return 0;
}
/*
38 71
63 7

5 11
3 10
*/
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/03ms1764 KiB
2Accepted0/02ms1928 KiB
3Accepted2/22ms2136 KiB
4Accepted2/22ms2204 KiB
5Accepted2/22ms2336 KiB
6Accepted2/22ms2520 KiB
7Accepted2/22ms2724 KiB
8Accepted2/22ms2820 KiB
9Accepted2/22ms2800 KiB
10Accepted2/22ms2928 KiB
11Accepted2/22ms3152 KiB
12Accepted2/22ms3360 KiB
13Accepted2/22ms3436 KiB
14Accepted2/22ms3732 KiB
15Accepted2/22ms3688 KiB
16Accepted2/22ms3572 KiB
17Accepted2/22ms3564 KiB
18Accepted2/22ms3640 KiB
19Accepted2/22ms3744 KiB
20Accepted2/22ms3644 KiB
21Accepted2/22ms3644 KiB
22Accepted2/22ms3640 KiB