Problem Description
Lovely Circular And Linear
Time limit: 1 SecMemory limit: 128 MB
Description
Find the number of intersection points between a circle (center coordinates: (x,y), radius: r) and a line (Ax+By+C=0).
Input
Multiple test cases, processed until end of file (EOF). The input consists of one line with x, y, r, A, B, C. All data are floating-point numbers with absolute values less than or equal to 1000.
Output
Output a number representing the number of intersection points between the line and the circle.
Sample Input
| |
Sample Output
| |
Problem Analysis
Math problem~
Determining the intersection points of a line and a circle
Just be careful when writing the formula
The rest is fine~
cpp
| |
Problem link: ZZULI [1768] Lovely Circular And Linear