1. Preface
Cross-Test the four-shot-from the CAB division (which means that yesterday was mine). I feel that the quality of today's topic is very high, the knowledge involved is very comprehensive, although it is based on the division of the rule. Violence is not all right, alas.
2. Color Fence Paint
Probably test instructions: give n a height of h[i] fence, each can be horizontal or vertical to a row or a row of coloring, each fence small lattice can only be painted once, the minimum number of times to paint.
The second point: two points. It's very similar to NOIP2013 's building block contest, but the subject can be painted in a row, but it's important to note that we only need a column of coloring if there's only one column in the area we're currently working on, so the difference is not big.
3. Chebnear Farm
Probably test instructions: There are n points in the coordinate system, there is a weight between any two points, if its Manhattan distance is less than equal to K, then there is a hostile relationship between the two points. We are now going to select some edges so that the maximum weight of these edges is minimized, and the point pairs that satisfy any hostile relationship end up in the same connected block.
Summary: This is a good question, I used O (n^2) to record all the distance to meet the point pair, and then O (M log m) with and check the merger and lookup points between the relationship between, apparently too violent.
The most recent point pair of plane. This is the core of the subject, whether you are violent or non-violent, using O (n log n) to find the nearest pair, the complexity will be a small section.
[Puzzle + Summary]20151015 Division