시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 1 1 1 100.000%

문제

A crazed boar has become lost in the forest! In its madness, it will charge in a random direction at blazing speed, until it has traveled a distance d, or until it hits a tree (in which case the boar will become dazed and end its charge), whichever comes first. Given the layout of trees around the boar, what is the probability the boar completes its wild charge without hitting a tree?

We will model the forest as the xy plane, with the boar a disk of radius b that begins centered at the origin (0, 0). We will also represent the trees as disks, with varying radii ri and centers (xi, yi). The boar charges by choosing a direction uniformly at random, and then translating in that direction for a distance d. The boar hits a tree and becomes dazed if, at any point during its charge, the boar’s body has nonzero area of overlap with any tree.

입력

The first line of input contains a single integer n (0 ≤ n ≤ 10 000), the number of trees in the forest. n lines follow, each of which contain three integers xi, yi, and ri, denoting the position and radius of the ith tree. These inputs satisfy −106 ≤ xi, yi ≤ 106 and 0 < ri ≤ 106. The final line of input contains two integer b and d, the radius of the boar (0 < b ≤ 106) and the distance that the boar will charge (0 ≤ d ≤ 106). You may assume that no tree overlaps with or touches the boar at the start of its charge (but trees might overlap or touch each other).

출력

Print a single real number: the probability that the boar completes its charge without hitting any tree. Your answer will be considered correct if it has absolute or relative error at most 10−6.

예제 입력 1

1
3 0 1
1 4

예제 출력 1

0.76772047

예제 입력 2

4
6 0 3
0 6 3
-6 0 3
0 -6 3
1 3

예제 출력 2

0.19253205