rectangles. Although there exists no rectangular grid that contains exactly two million rectangles, find the area of the grid with the nearest solution.''' # def get_n_of_contained_rectangles(width, ...
For instance, in the grid above, B represents black cells and W represents white cells. In that example, there are eight black rectangles: four 1x1, one 2x1, two 1x2, and one 1x3 rectangle. How do we ...