#P3630. Average GSM Coverage

    ID: 16881 Type: Default 1000ms 256MiB

Average GSM Coverage

Average GSM Coverage

A telecom company is establishing a GSM network in Beijing. There are n houses in the city, each represented by a point with two-dimensional integer coordinates. Due to budget constraints, the company can install only one antenna. In order to simplify the placement, the company randomly selects three different houses and constructs the unique circumcircle passing through them (since no three houses are collinear). The antenna is then placed at the center of the circumcircle, and all houses that lie inside or on the boundary of the circle are considered to be covered by the signal.

Your task is to compute the average number of houses covered over all possible choices of three houses. More formally, if there are T = \(\binom{n}{3}\) valid choices and the \(i\)th choice covers \(c_i\) houses, you are to output the average, i.e.,

[ \text{Average} = \frac{\sum_{i=1}^{T} c_i}{T} ]

You may assume that any three houses are not collinear and any four houses are not concyclic.

inputFormat

The first line contains a single integer n (n \(\ge 3\)). Each of the following n lines contains two integers representing the x and y coordinates of a house.

outputFormat

Output the average number of houses covered, rounded to two decimal places.

sample

4
0 0
0 1
1 0
1 1
4.00