Type: Default 1000ms 64MiB

曼哈顿距离

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

平面直角坐标系中位于坐标(x1,y1)的i点与位于坐标(x2,y2)的j点的曼哈顿距离为d(i,j)=|x1-x2|+|y1-y2|。请编程输入两个点的坐标,输出它们之间的曼哈顿距离。

Format

Input

一行四个整数(100以内),分别表示两个点的坐标(x1,y1)和(x2,y2)。

Output

一行一个整数,表示两个点之间的曼哈顿距离。

Samples

10 5 6 20
19

Limitation

1s, 64Mb for each test case.

函数

Not Claimed
Status
Done
Problem
12
Open Since
2024-11-10 0:00
Deadline
2024-12-7 23:59
Extension
24 hour(s)