differentdistances - bradendubois/competitive-programming GitHub Wiki

Different Distances

ID: differentdistances

Difficulty: 1.6

CPU Time: 1 second

Memory: 1024 MB

Solution

For each line of input (x1, y1, x2, y2, p), the solution shown is the formula (|x1 - x2|^p + |y1 - y2|^p)^(1/p).