Orz ..... God TM number-form combination problem
Test instructions: http://www.lydsy.com/JudgeOnline/problem.php?id=1062
inserting segments, deleting segments, querying the number of segments within a range, and moving segments over time
Sol: The segment must not operate, consider turning the line into a point
First obviously because 2*len is a cycle, so T%=2*len
Because the line segment has an initial position of L, consider moving the segment to the l=0 position, representing the segment in time and length
When you insert a point, the coordinates of that point are ((t-l*d)%len,r-l)
Delete a point, delete it directly
For a query operation, the T-moment has a line segment with [L,r] such as
First draw the image of the t=0, left and right along the X=len symmetry, and then move the T-unit, over the right edge of the fill to the left
.... This strange figure can't handle qaq but it can be parallelogram.
It's still more difficult to qaq, but it can be turned into a rectangle by distorting the coordinate system.
The <len point is still t, and the ordinate is T+PI
The >len point is still t, and the ordinate is T﹣PI
Well.... Then is the plane dot, delete point, query sub-matrix and qwq with two-dimensional tree array maintenance can
bzoj1062 "noi2008" Candy Rain