I want to add to a rectangular section of two-dimensional space and read it out in points.
Alternative representation: given a set of rectangles and a point. We want the sum of the number/cost of rectangles containing points PAST2N.
sort add and read on one axis and time axis on the other
When RangeAdd and Read overlap at the same coordinates
When the range of x values is large, coordinate compression is required
This page is auto-translated from /nishio/長方形区間add using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.