eolymp
bolt
Try our new interface for solving problems
Məsələlər

Inside Circle

Inside Circle

Zaman məhdudiyyəti 2 saniyə
Yaddaşı istafadə məhdudiyyəti 256 MiB

There are N points on two-dimensional plane. It is guaranteed that any three points are not in a line and any four points are not on a circle. We randomly pick 3 different points to make a circle and compute value I, defined as number of points that are inside the circle.

Your task is to calculate the mean value (mathematical expectation) of random variable I. Assume that each point has equal probability to be picked.

Giriş verilənləri

The first line of input contains a single positive integer N, the total number of points (3N1500). Each of followingN lines contains pair of integers x_i and y_i, - coordinates of the corresponding point.

Çıxış verilənləri

Output should contains a single real number, average number of points inside a circle, constructed by randomly chosen 3 different points, accurate to two digits after decimal point.

Nümunə

Giriş verilənləri #1
5
0 0
-1 -1
-1 1
1 0
1 2
Çıxış verilənləri #1
0.800
Mənbə ACM-ICPC Ukraine 2012, 2nd Stage Ukraine, September 6, 2012