/**
 * Firefighter needs to extinguish a fire at the given location using a given water level.
 * Return true if the fire is successfully extinguished, false otherwise.
 *
 * @param fireLocation A pair containing the x and y coordinates of the fire.
 * @param waterLevel The amount of water available for extinguishing the fire.
 * @return true if the fire is successfully extinguished, false otherwise.
 */
fun extinguishFire(fireLocation: Pair<Int, Int>, waterLevel: Int): Boolean {

    // Your task is to complete the code to extinguish the fire

    // Check if there is any water available
    if (waterLevel <= 0) {
        return false
    }

    // The fire location
    val (x, y) = fireLocation

    // Modify the coordinates of the fire location using a pair (deltaX, deltaY)
    val deltaCoordinates = listOf(Pair(0, 0), Pair(-1, 0), Pair(0, -1), Pair(1, 0), Pair(0, 1))  // Possible directions to move

    // Check if firefighter can move in each direction and extinguish the fire
    for ((deltaX, deltaY) in deltaCoordinates) {
        // Implement the logic to move and extinguish the fire
    }

    return false
}
/**
 * Firefighter needs to extinguish a fire at the given location using a given water level.
 * Return true if the fire is successfully extinguished, false otherwise.
 *
 * @param fireLocation A pair containing the x and y coordinates of the fire.
 * @param waterLevel The amount of water available for extinguishing the fire.
 * @return true if the fire is successfully extinguished, false otherwise.
 */
fun extinguishFire(fireLocation: Pair<Int, Int>, waterLevel: Int): Boolean {
/**
 * Firefighter needs to extinguish a fire at the given location using a given water level.
 * Return true if the fire is successfully extinguished, false otherwise.
 *
 * @param fireLocation A pair containing the x and y coordinates of the fire.
 * @param waterLevel The amount of water available for extinguishing the fire.
 * @return true if the fire is successfully extinguished, false otherwise.
 */
fun extinguishFire(fireLocation: Pair<Int, Int>, waterLevel: Int): Boolean {

    // Your task is to complete the code to extinguish the fire

    // Check if there is any water available
    if (waterLevel <= 0) {
        return false
    }

    // The fire location
    val (x, y) = fireLocation

    // Modify the coordinates of the fire location using a pair (deltaX, deltaY)
    val deltaCoordinates = listOf(Pair(0, 0), Pair(-1, 0), Pair(0, -1), Pair(1, 0), Pair(0, 1))  // Possible directions to move

    // Check if firefighter can move in each direction and extinguish the fire
    for ((deltaX, deltaY) in deltaCoordinates) {
        // Implement the logic to move and extinguish the fire
    }

    return false
}