191 003 Data Structure --- Jinhua

A
discussion of the size of y, if a large \ sqrt {m} pretreatment of violence less than do. Complexity \ (O (N \ sqrt { M}) \)

2
Consider reverse operation, maintenance and check for sequence assembly, which represents the next undyed point, violence maintenance.
Complexity \ (O (NlogN) \)

3
to consider the obstacles one by one and then delete the whole join, easy to get side length of the square did not fall. Enumeration side length, maintaining a point to the left to go right up to a few cells, after a violent row in the modified obstacle is removed. A test square is legitimate as long as you can look drab queue maintenance.

4
considered partition, each selection longer sides of the rectangle cut from the middle, for each point on the line to do it again to the other of each point of the shortest path. Obviously all of this interrogation points after the shortest of this line can be calculated. Because of the long cross-sectional side every time, so the remaining longer side of the rectangle side length must be smaller than \ sqrt {S}, S is the area of the original rectangle. Therefore, the complexity of the \ (O (S \ sqrt { S} logS + qlogS) \)

5
Divide and Conquer, every time the point in half, now as far as the point through the center line of the. Set distance is h, it is only about the middle distance is a useful point of h. For each such point, ........ At most only seven points and the contribution it can produce. Complexity \ (O (NlogN) \)

6
selected a cutting edge, calculate the shortest path through these two points, the partition can go on.
Complexity \ (O (Nlog_ {1.5} N) \) demonstrated? ? ?

7

Guess you like

Origin www.cnblogs.com/zxynothing/p/11619234.html