
The first line contains two space-separated integers: R (number of rows) and C (number of columns) in the matrix.
The next R lines each contain C space-separated integers, representing the rows of the matrix.
The final line contains four space-separated integers: r1, c1, r2, c2, representing the 0-indexed coordinates of the top-left and bottom-right corners of the target rectangle.
The output should be a single integer representing the sum of all elements within the specified rectangle.
The matrix coordinates are 0-indexed.
The rectangle's boundaries (r1, c1, r2, c2) are inclusive.
The sum can be large, so be mindful of potential integer overflow.
Find the maximum element of each row
Find the maximum element of each row
Isolated Intervals Finder
Treasure Island Route
Largest Plus Sign
Minimum Operations to Form Letter Y