21352022-12-21 19:22:52HorakZsofiMicimackó (40 pont)cpp11Wrong answer 34/403ms4152 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int a, b, c, d;
	cin>>a>>b>>c>>d;
	int cs=0;
	if(a<c){
		cs=c-a;	
	}
	if(cs+d>b-a){
		cs=cs+d-b+a;
	}
	cout<<cs;
}
SubtaskSumTestVerdictTimeMemory
base34/40
1Accepted0/03ms1872 KiB
2Wrong answer0/02ms2124 KiB
3Accepted2/22ms2276 KiB
4Accepted2/22ms2748 KiB
5Wrong answer0/22ms2796 KiB
6Accepted2/22ms3000 KiB
7Accepted2/22ms3244 KiB
8Accepted2/22ms3212 KiB
9Accepted2/22ms3212 KiB
10Accepted2/22ms3208 KiB
11Accepted2/22ms3364 KiB
12Wrong answer0/22ms3292 KiB
13Accepted2/22ms3320 KiB
14Accepted2/22ms3448 KiB
15Accepted2/22ms3648 KiB
16Accepted2/22ms3860 KiB
17Accepted2/22ms3936 KiB
18Accepted2/22ms3956 KiB
19Wrong answer0/22ms3936 KiB
20Accepted2/22ms3960 KiB
21Accepted2/22ms4052 KiB
22Accepted2/22ms4152 KiB