F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Easy Geometry

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 302    Accepted Submission(s): 93


Problem Description
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.
 

Input
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.
 

Output
For each test case, output the answer rounded to 2 digits after the decimal point.
 

Sample Input
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
 

Sample Output
0.50 1.98 1.94
 

Author
hanshuai@WHU
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 11:15:42, Gzip enabled