1913: [Apio2010]signaling signal coverage time limit:20 Sec Memory limit:64 MB
submit:1502 solved:615
[Submit] [Status] [Discuss] Description input The first line contains a positive integer n, which represents the total number of houses. Next there are n lines, each representing the location of each house. For i = 1, 2, ..., n, the coordinates of the I house are represented by a pair of integers xi and Yi, separated by a space between them. The output file contains a real number that indicates how many houses are covered by the signal, and the absolute error between the output and the exact value must be guaranteed to be no more than 0.01. Sample Input4
0 2
4 4
0 0
2 0Sample Output3.500HINT
3.5, 3.50, 3.500, ... Any one of the outputs is correct. In addition, 3.49, 3.51,
3.499999, ... And so on are also acceptable outputs.
"Data Range"
100% data Guarantee, for i = 1, 2, ..., n, the coordinates of the I House (xi, Yi) is an integer and
–1,000,000≤xi, yi≤1,000,000. Any three houses are not in the same line, any four houses are not
On the same circle;
40% of data, n≤100;
70% of data, n≤500;
100% of the data, 3≤n≤1,500.
Idea {
The direct enumeration scheme calculation is not obvious .
Somehow, I thought of solving the problem with polygonal method .
discover ans contribution to the Span style= "font-family: ' Liberation Serif ', Serif;" >2 (diagonal and >180 two points Span style= "font-family: ' Liberation Serif ', Serif;" >1 ( Cover the indentation of that point ).
So the problem translates to the number of concave polygons
We enumerate each point
This polar angle sort of <π, then the dots on the bottom edge and all the point combinations in this middle will not include the center point
combine numbers minus
combined number of convex polygons can be
3. /span>
}
BZOJ1913: [apio2010]signaling Signal Overlay