Skip to content

differentdistances

bradendubois edited this page Jun 9, 2021 · 6 revisions

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).

Clone this wiki locally