Check if two given circles touch each other
Submissions: 1233   Accuracy:

31.39%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

There are two circle A and B with their centers C1(x1, y1) and C2(x2, y2) and radius R1 and R2. Task is to check both circles A and B touch or intersect each other or not.

Input:
First line consists of T test cases. Only line of every test cases consists of 6 integers, x1, y1, x2, y2, r1 and r2.

Output:
Single line output, print "1" if both circles touch each other else "0".

Constraints:
1<=T<=100
-1000<=x1,y1,x2,y2,r1,r2<=1000

Example:
Input:

2
3 4 14 18 5 8
3 4 14 18 5 18
Output:
0
1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.