solulubeta
Sign in
Story Problems / Arrays, windows & two pointers
01.20 · Problem

Rainfall in Any Rectangle

Hard 2-D prefix sums Pro

This problem is part of solulu Pro

A city has rain sensors in a grid, each holding today's rainfall. The weather office will ask many questions of the form *"what is the total rainfall inside the rectangle from (r1, c1) to (r2, c2) inclusive?"* Answer all…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 20 of 94 · updated 2026-10-12