18942022-12-07 20:59:08JMMirkoMicimackó (40 pont)cpp17Accepted 40/403ms4316 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int ny, m,mez,b;
	cin >> ny >> m >> mez >> b;
	m=m-ny;
	mez-=ny;
	if(mez<0)mez=0;
	mez+=b-m;
	if(mez<0)mez=0;
	cout << mez;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/03ms1872 KiB
2Accepted0/02ms2124 KiB
3Accepted2/22ms2272 KiB
4Accepted2/22ms2512 KiB
5Accepted2/22ms2716 KiB
6Accepted2/22ms2924 KiB
7Accepted2/22ms2964 KiB
8Accepted2/22ms3092 KiB
9Accepted2/22ms3308 KiB
10Accepted2/22ms3436 KiB
11Accepted2/22ms3600 KiB
12Accepted2/22ms3812 KiB
13Accepted2/22ms3896 KiB
14Accepted2/22ms3804 KiB
15Accepted2/22ms4004 KiB
16Accepted2/22ms4104 KiB
17Accepted2/22ms4076 KiB
18Accepted2/22ms4200 KiB
19Accepted2/22ms4200 KiB
20Accepted2/22ms4200 KiB
21Accepted2/22ms4316 KiB
22Accepted2/22ms4196 KiB