#C6465. Drone Package Delivery
Drone Package Delivery
Drone Package Delivery
You are given the starting coordinates of a drone and its maximum delivery range, along with the coordinates of a package. Your task is to determine whether the drone can deliver the package.
The drone can deliver the package if the Euclidean distance between the drone's starting position \( (x_{sd}, y_{sd}) \) and the package's location \( (x_p, y_p) \) is less than or equal to its delivery range \( r \). The distance is computed using the formula:
[ \text{distance} = \sqrt{(x_{sd} - x_p)^2 + (y_{sd} - y_p)^2} ]
If the distance is \( \leq r \), print Deliverable
; otherwise, print Not Deliverable
.
inputFormat
The input consists of a single line containing five integers separated by spaces:
x_sd
: the x-coordinate of the drone's starting positiony_sd
: the y-coordinate of the drone's starting positionr
: the maximum delivery range of the dronex_p
: the x-coordinate of the package's positiony_p
: the y-coordinate of the package's position
Input is provided through stdin.
outputFormat
Output a single line containing either Deliverable
if the drone can deliver the package, or Not Deliverable
if it cannot. The output should be written to stdout.
0 0 5 3 4
Deliverable