Use exact operation boundaries. The right result depends on deferred state, ancestor depth, rectangle corners, and displaced hash slots.
Lessons
- Lazy segment tree: add to a range and query its minimum
- Binary lifting: ancestors and common managers
- Two-dimensional Fenwick tree: update cells and sum rectangles
- Robin Hood hashing: probe distance and backward-shift deletion
