30 atcoder#ABC180B. [ABC180B] Various distances
[ABC180B] Various distances
Score : points
Problem Statement
Given is a point in an -dimensional space.
Find the Manhattan distance, Euclidian distance, and Chebyshev distance between this point and the origin. Here, each of them is defined as follows:
- The Manhattan distance:
- The Euclidian distance:
- The Chebyshev distance:
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the Manhattan distance, Euclidian distance, and Chebyshev distance between the given point and the origin, each in its own line. Each value in your print will be accepted when its absolute or relative error from the correct value is at most .
2
2 -1
3
2.236067977499790
2
Each of the distances is computed as follows:
- The Manhattan distance:
- The Euclidian distance:
- The Chebyshev distance:
10
3 -1 -4 1 -5 9 2 -6 5 -3
39
14.387494569938159
9