Circle Union
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Computational geometry is the key to modern programming contests.
You are given circles, the -th of which will appear with probability . Your task is to compute the expected area of the union of the appeared circles. Note that the appearance of the circles are mutually independent random events.

输入描述:

The first line contains an integer .
The following lines describe the given circles. The -th line contains four integers , r_i and , describing the i-th circle whose center is (x_i,y_i), the radius is r_i and the probability of appearance is .

输出描述:

Output one number - the answer. Your answer will be considered correct if its relative or absolute error doesn’t exceed .
示例1

输入

复制
5
1 1 1 600
1 1 1 100
1 2 1 700
0 0 3 500
10 10 1 1000

输出

复制
19.1944414132