Circle and segment#2398

Circle and segment

1 secondo
64 megabyte
Difficile

Determine how many points of intersection there are between a circle defined by the center coordinates , and radius , and a segment with endpoints (X_1, Y_1) and (X_2, Y_2).

Input

Seven integers: , , , X_1, Y_1, X_2, Y_2, each with absolute value not exceeding .

Output

The number of intersection points.

Esempi

Esempio 1

Loading
Loading