Counting Rectangles of 1's in a Binary Grid

Правка en1, от MinhBoss13, 2024-08-22 06:50:07

Hi everyone! I have an interesting problem for which I haven't devised a solution yet. Can you help me?

Problem Statement:

Imagine you have a 2D grid (with dimensions m×n), where each cell in the grid can either be 0 or 1. Your task is to count the number of rectangles (or submatrices) that are made entirely of 1's.

Constraint: mxn <= 1e6

Thanks for taking the time to read and help me!

Теги grid, counting, binary

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MinhBoss13 2024-08-22 06:50:07 465 Initial revision (published)