#3217. Difference Max

0

Difference Max

Difference Max

题目描述

Given are integers aa, bb, cc, and dd.
We will choose integers xx and yy such that a≤x≤ba ≤ x ≤ b and c≤y≤dc ≤ y ≤ d. Find the maximum possible value of x−yx - y here.

输入格式

Input is given from Standard Input in the following format: aa bb cc dd

输出格式

Print the answer.

0 10
0 10
10
-100 -100
100 100
-200
-100 100
-100 100
200

提示

All values in input are integers. −100≤a≤b≤100-100 ≤ a ≤ b ≤ 100 −100≤c≤d≤100-100 ≤ c ≤ d ≤ 100(x,y)=(10,0)(x, y) = (10, 0) achieves the maximum value x−y=10x - y = 10.

标签: AtCoder|abc196A

来源

AtCoder|abc196A