145422025-01-14 13:15:32TortelliniJrMicimackó (40 pont)cpp17Accepted 40/402ms508 KiB
#include <iostream>
using namespace std;
int main()
{
    int nt, mt, oc, nc;
    cin >> nt >> mt;
    cin >> oc >> nc;
    oc -= nt;
    if (oc < 0)
    {
        oc = 0;
    }
    oc += nc;
    oc -= (mt - nt);
    if (oc < 0)
    {
        oc = 0;
    }
    cout << oc;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/01ms508 KiB
2Accepted0/01ms316 KiB
3Accepted2/21ms508 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted2/21ms316 KiB
7Accepted2/21ms328 KiB
8Accepted2/21ms316 KiB
9Accepted2/21ms316 KiB
10Accepted2/21ms316 KiB
11Accepted2/21ms372 KiB
12Accepted2/21ms384 KiB
13Accepted2/21ms316 KiB
14Accepted2/21ms316 KiB
15Accepted2/21ms316 KiB
16Accepted2/22ms316 KiB
17Accepted2/21ms316 KiB
18Accepted2/21ms316 KiB
19Accepted2/21ms316 KiB
20Accepted2/21ms316 KiB
21Accepted2/21ms388 KiB
22Accepted2/21ms316 KiB