Logo
(追記) (追記ここまで)

7333번 - Dolphin Pool 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB1644100.000%

문제

In a newly constructed dolphin pool in the Kish island in Persian Gulf, one of the fun games is as follows: the game director throws several plastic rings in the pool such that center of no ring lies inside any other ring, and no two rings are tangent. The dolphins are trained to jump out on the director s whistle through the closed areas that are completely outside the rings, one dolphin from one such area. The dolphins jump out if and only if the number of closed areas exactly equals to the number of dolphins.

You are to write a program to given the following input/output description, finds the number of closed areas between rings to help the dolphins decide to jump out or not.

입력

The first line includes the number of test cases (at most 20). Each test case data has an integer N (1 ≤ N ≤ 20), the number of plastic rings, in its first line. Following the first line there are N lines, each containing three integers, the first and second being the x and y coordinates of the circle of the ring, and the third is its radius. Coordinates are positive integers less than 1000 and the radius is in the range 1...100.

출력

For each test case, there must be one line in the output including the number of closed areas in that test case.

제한

예제 입력 1

2
4
100 100 20
100 135 20
135 100 20
135 135 20
1
10 10 40

예제 출력 1

1
0

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > Tehran Site 2000 H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /