Submit | All submissions | Best solutions | Back to list |
SMPCIRC - Two Circles |
Given two circles: O1 with the center o1 = (x1, y1) and a radius r1 and O2 with the center o2 = (x2, y2) and radius r2, please compute if O1 is inside O2 or if O2 is inside O1.
Input
First t < 1000, the number of test cases. In each of the following t lines, 6 integers: x1 y1 r1 x2 y2 r2. Where 0 ≤ x1, y1, x2, y2 ≤ 10000 and 0 < r1, r2 ≤ 10000.
Output
For each test case print one character:
- I, if O1 is inside O2 (or if O2 is inside O1),
- E, if O1 is internally tangent to O2 (or if O2 is internally tangent to O1),
- O, in other cases.
Example
Input: 2 103 104 5 100 100 10 103 104 10 100 100 10 Output: E O
Added by: | kuszi |
Date: | 2013-08-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 NCSHARP JULIA PYPY3 |