아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Grazed Grains

면접 대비

시간 제한3초메모리 제한1024 MB

요약
정수 좌표 중심과 반지름을 가진 원이 최대 10개 주어질 때, 합집합의 넓이를 상대오차 10% 이내로 구한다.
난이도

보통10점 중 4점

유형
기하, 구현, 수학, 완전 탐색
정답자
아직 제출이 없습니다

문제

This year, there have been unusually many UFO sightings reported. Nobody knows if they are caused by optical illusions, weather phenomena, or secret technology being tested by foreign powers (terrestrial or not). UFO enthusiasts across the world rejoice, and speculations run wild. But someone who is not impressed is the farmer Celeste. Her large grain field has repeatedly been used as a landing site by the UFOs, destroying her crops. Celeste would like to bring whoever is responsible to justice, but before she can do so she must assess the damage caused by the unidentified flying offenders.

In total nn circular UFOs have landed in Celeste's field. The iith one left a crop circle which destroyed all crops within radius r_ir\_i of the point x_i,y_ix\_i, y\_i. The field is very large, so you can assume that it extends infinitely in all directions. Your task is to estimate the total area of crops destroyed by the UFOs. Celeste only needs a rough estimate of the true answer, and your answer will be counted as correct if its relative error is less than 1010\\%.

입력

The first line of input contains one integer nn (1≤n≤101 \leq n \leq 10), the number of UFOs. Then follow nn lines, the iith of which contains the three integers x_ix\_i, y_iy\_i, and r_ir\_i (0≤x_i,y_i≤100 \leq x\_i, y\_i \leq 10, 1≤r_i≤101 \leq r\_i \leq 10), describing the crop circle left by the iith UFO.

출력

Output the total area covered by the crop circles in the input, with a relative error of at most 1/101/10.

예제2

  1. 예제 1

    입력
    1
    0 0 1
    
    예상 출력
    3.1415926535
    
  2. 예제 2

    입력
    4
    0 0 2
    1 0 1
    2 2 2
    10 10 1
    
    예상 출력
    25.991148