|
||||||||||
The gold minersTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 228 Accepted Submission(s): 62 Problem Description There are some funny mini games on the internet. Sailormoon girls usually play these games in them spare time. They always play a mini game named THE GOLD MINNERS. Now they give you a problem about this game. Could you solve it? Now let¡¯s look at the following picture. We set the position of the minner as the origin of coordinate.There are many objects in this game,not only gold. They also have diamonds,stones,and other unknown things.All the objects can be treated as polygon. Every two polygons can not intersect. In this problem,we will give you some data about the angle in order. When the hook with certain angle sinking, it will always catch nearest object, and get the corresponding money. There will be nothing in the position of this object later. If there have no objects,the hook will return back to the origin of coordinate. How much money does the minner have at last?Do you know? Input There are multiple test cases. Each case begins with a positive integer N (0 <= N <= 30) , it means there are N objects. The following N * 2 lines describe the informatin about objects. Each object starts with a positive integer V (3 <= V <= 15), it means this object can be treated as a polygon with V vertex. Followed by a positive integer W which is the value of this object. The next line contains V * 2 decimal number. X1,Y1,X2,Y2¡¡Xv,Yv. You can suppose all coordinate data are in the double range.Vertex coordinates clockwise. Then followed by a positive integer M (M <= 100) which is number of the minner cast hook. The following M lines contains M positive integer.The Xth integer means the angle with which the minner cast hook the Xth.(0 < angle < 180) Output Calculate and print the value of the minner earn at last for each test case. Sample Input
Sample Output
Author B.A.C Source | ||||||||||
|