Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
Consider N different circles on the plane. They divide it to several parts, you have to find the number of these parts.
For the purpose of this problem the circle of radius r with center (x0, y0) is the set of points
The first line of each test case contains N - the number of circles (1 <= N <= 50). Next N lines contain three integer numbers x0, y0, and r each - the coordinates of the center and the radius of the circle. All coordinates do not exceed 103 by their absolute value, all radii are positive and do not exceed 103. No two circles coincide.
For each test case, output K - the number of parts circles divide the plane to, in a single line.
Due to floating point precision losses possible, do not consider parts with area not exceeding 10-10.
Andrew Stankevich Contest 4