BZOJ1913: [apio2010]signaling signal coverage

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.