/**
 * Calculates the distance between two points in a 2D plane.
 */
fun calculateDistance(p1: Pair<Int, Int>, p2: Pair<Int, Int>): Double {

    val (x1, y1) = p1
    val (x2, y2) = p2
    val distance = kotlin.math.abs((x2 - x1) + (y2 - y1).toDouble())

    return distance
}
/**
 * Calculates the distance between two points in a 2D plane.
 */
fun calculateDistance(p1: Pair<Int, Int>, p2: Pair<Int, Int>): Double {
/**
 * Calculates the distance between two points in a 2D plane.
 */
fun calculateDistance(p1: Pair<Int, Int>, p2: Pair<Int, Int>): Double {

    val (x1, y1) = p1
    val (x2, y2) = p2
    val distance = kotlin.math.abs((x2 - x1) + (y2 - y1).toDouble())

    return distance
}