Types: r: int, c: int, q: int, grid: List[List[int]], r1: int, c1: int, r2: int, c2: int  
Ranges: 1 ≤ r*c ≤ 10^6, 0 ≤ grid[i][j] ≤ 2^31-1, 1 ≤ q ≤ 10^4, 0 ≤ r1 ≤ r2 < r, 0 ≤ c1 ≤ c2 < c  
Addtl Info: If r*c ≤ 250000, then q ≤ 100