PROGRAMMING:Soldiers line up
On a gridded playground, n soldiers stand scattered on grid points. The grid points are represented by integer coordinates (x, y). Soldiers can move one step up, down, left and right along the edge of the grid, but there can only be one soldier at any grid point at the same time. According to the order of the officer, the soldiers should be arranged in a horizontal line, that is, (x, y), (x + 1, y),..., (x + n-1, y). How to choose the value of X and y to make the soldiers line up with the least total moving steps.
Program to calculate the minimum number of moving steps needed to make all soldiers line up.
**Title From POJ**
###Input format:
The first line is the number of soldiers n, 1 ≤ n ≤ 10000. The next N lines are the initial positions of soldiers. Each line has two integers x and y, - 10000 ≤ x, y ≤ 10000.
###Output format:
A data, that is, the minimum number of moving steps required for soldiers to line up.
###Input example:
```in
five
1 2
2 2
1 3
3 -2
3 3
```
###Output example:
```out
eight
```
answer:If there is no answer, please comment
Program to calculate the minimum number of moving steps needed to make all soldiers line up.
**Title From POJ**
###Input format:
The first line is the number of soldiers n, 1 ≤ n ≤ 10000. The next N lines are the initial positions of soldiers. Each line has two integers x and y, - 10000 ≤ x, y ≤ 10000.
###Output format:
A data, that is, the minimum number of moving steps required for soldiers to line up.
###Input example:
```in
five
1 2
2 2
1 3
3 -2
3 3
```
###Output example:
```out
eight
```
answer:If there is no answer, please comment