Problem 1476 · Medium

Subrectangle Queries

Keep an update log for the rectangle and answer each cell query from the newest update that covers the cell.

Open the interactive visualisation