some common distances

2 days until TJOI.

Chebyshev distance: max(△x,△y).

Manhattan distance: △x+△y

Euclidean distance: slightly

After changing the coordinates of a point ( x , y )  to  ( x + y , x y ) , Manhattan distance in the original coordinate system =  Chebyshev distance in the  new  coordinate system becomes ( (x+y)/2 , (xy)/ 2)  , the Chebyshev distance in the original coordinate system = the Manhattan distance in the new coordinate system.

Come on, you TJOI!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325726903&siteId=291194637