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 |
hide comments
|
||||||
2021-05-11 10:58:44
Easy |
||||||
2020-08-15 14:36:28
Make sure that you output "E" when the two circles are equal. This actually isn't mathematically correct, but it's the way that these tests seem to work. |
||||||
2020-06-12 21:00:55
my code is working on codeblocks but ideone is showing error. |
||||||
2020-04-05 12:34:27
my code perfectly works on ideone but it is not getting submitted on the online judge as it is showing wrong answer. Can somebody help? Last edit: 2020-04-05 12:34:47 |
||||||
2020-03-25 21:42:47
The constraints hold and the input is correctly formatted. |
||||||
2020-03-25 19:34:08
To problem author: Please check the ranges in the input data. I kept getting NZEC, until I removed the asserts checking the input. |
||||||
2019-08-09 03:37:48
<snip> also got WA!! Last edit: 2023-02-10 07:32:20 |
||||||
2018-10-21 06:34:04
It is easy mainly we have to find the distance between the two centres and thereafter keep in mind all the 5 cases . |
||||||
2018-09-18 04:38:58
lmao, i got the 999th and 1000th ac |
||||||
2018-06-26 17:46:16
I have correctly written the code in devC++ using C, but here its showing wrong answer; help! |