IBMOA #13
Circles Relationship
Estimated EasyJudge-ready
Topics (AI-labelled)Bits & MathSimulation
The centers of two circles both lie on the X axis or both lie on the Y axis (never both axes at once); classify their relation. Concentric takes priority; otherwise, one intersection point is Touching, two are Intersecting, lying apart outside each other is Disjoint-Outside, and one lying inside the other without intersecting is Disjoint-Inside. A radius of 0 is valid.
Input
The first line contains n, followed by n lines of six integers x y R x2 y2 R2. 1≤n≤5000, coordinates and radii are 0..5000, and the common axis is guaranteed.
Output
Output one English relation name per line.
Example 1
Input:
1
1 0 2 1 0 0
Output:
Concentric
Example 2
Input:
2
0 1 1 0 3 1
0 1 2 0 2 2
Output:
Touching
Intersecting
Example 3
Input:
2
1 0 0 3 0 1
1 0 5 2 0 1
Output:
Disjoint-Outside
Disjoint-Inside
Example notes
The examples give Concentric; Touching/Intersecting; and Disjoint-Outside/Disjoint-Inside respectively.
Editorial
Loading solution…