Time

09:51:13
11 Feb 2012
Five for week 22
Left: 12 hours 9 minutes
End: 11.02.2012 22:00
Leader: NuM
Version for print

Two circles

prb4

   How many points in common two given circles have?


Specifications

   Input

   6 numbers x1, y1, r1, x2, y2, r2, where x1, y1, x2, y2 are the coordinates of the centers of the circles, r1, r2 are its radii.

   Output

   The number of common points for two circles: 0, 1 or 2. Print -1 if circles have a lot of common points.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 14.2857
Complexity: 42% 986/1689
Classes: Geometry

Example

Example input

0 0 5 5 0 5

Example output

2


← Match’s model Problems Two factors →