Problem 1476 · Medium
Keep an update log for the rectangle and answer each cell query from the newest update that covers the cell.
Open the interactive visualisation