题目描述
There are a set of points in the plane. Dumbear will choose some of them and find the convex hull of the chosen points. For each point, we know that probability that Dumbear will choose it. We want to know the expected number of vertexes the convex hull had.
You can assume that any three points are not in the same line. If the number of the chosen points is smaller than three, we think all the chosen points are vertexes of the convex hull.
输入
There are several test cases in the input.
The first line of each test case contains an integer n (1<=n<=1000). n lines follow, each line contains three integers x, y and p (1<=x, y<= 100000, 0 <= p < 100) indicating a point at (x, y) and Dumbear will choose it with probability p%.
The input terminates by end of file marker.
输出
For each test case, output the answer rounded to 2 digits after the decimal point.
1
1 1 50
3
1 1 99
1 2 99
2 3 0
4
1 1 50
5 1 50
1 5 50
2 2 50