21362022-12-21 19:27:03HorakZsofiMicimackó (40 pont)cpp11Wrong answer 18/403ms4420 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
base18/40
1Accepted0/03ms1748 KiB
2Wrong answer0/02ms1912 KiB
3Wrong answer0/22ms2152 KiB
4Wrong answer0/22ms2352 KiB
5Wrong answer0/22ms2560 KiB
6Accepted2/22ms2728 KiB
7Accepted2/22ms2800 KiB
8Accepted2/22ms2956 KiB
9Accepted2/22ms3184 KiB
10Wrong answer0/22ms3256 KiB
11Accepted2/22ms3336 KiB
12Wrong answer0/22ms3544 KiB
13Wrong answer0/22ms3616 KiB
14Accepted2/22ms3744 KiB
15Accepted2/22ms3828 KiB
16Wrong answer0/22ms3940 KiB
17Wrong answer0/22ms3932 KiB
18Wrong answer0/22ms4192 KiB
19Wrong answer0/22ms4420 KiB
20Accepted2/22ms4388 KiB
21Accepted2/22ms4280 KiB
22Wrong answer0/22ms4280 KiB