loj6270. Data Structure board questions

The meaning of problems

slightly.

answer

Hu mouth about.
To an interval \ ([L, R] \ ) as a point on the plane II D \ ((L, R & lt) \) , each time the query is a query point isosceles right triangle which number (two lumbar are parallel to the two coordinate axes).
Then this thing can cdq + partition number of two-dimensional points to do, according to each of the boundary line is the position where the hypotenuse.
Enumeration such a straight line slope equal to 1, then this would be on the left oblique straight lines which contribute to the triangle to the right of this line.
Complexity \ (\ mathcal T (n-) = 2 \ mathcal T (\ FRAC {n-} {2}) + \ mathcal O (n-\ log n-) \) , i.e., \ (\ mathcal O (n \ log ^ 2 the n-) \) .

Guess you like

Origin www.cnblogs.com/psimonw/p/11479158.html