Distance II
Your task is to calculate the distance between two n dimensional vectors x={x1,x2,...,xn} and y={y1,y2,...,yn}.
The Minkowski's distance defined below is a metric which is a generalization of both the Manhattan distance and the Euclidean distance.
It can be the Manhattan distance
where p=1.
It can be the Euclidean distance
where p=2.
Also, it can be the Chebyshev distance
where p=∞
Write a program which reads two n dimensional vectors x and y, and calculates Minkowski's distance where p=1,2,3,∞ respectively.