#AT1757. A - Difference Max
A - Difference Max
A - Difference Max
Score : $100$ points
Problem Statement
Given are integers $a$, $b$, $c$, and $d$.
We will choose integers $x$ and $y$ such that $a ≤ x ≤ b$ and $c ≤ y ≤ d$. Find the maximum possible value of $x - y$ here.
Constraints
- All values in input are integers.
- $-100 ≤ a ≤ b ≤ 100$
- $-100 ≤ c ≤ d ≤ 100$
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
0 10
0 10
10
$(x, y) = (10, 0)$ achieves the maximum value $x - y = 10$.
-100 -100
100 100
-200
-100 100
-100 100
200