ATTENTION: this is not maximal rectangle problem. this is about number of rectangles.
I am looking for an algorithm to compute total number of blue rectangles(not maximal rectangle). this algorithm must be O(n^2) and we have a constraint that the board is Square(n*n) or in this picture m=n.
thanks in advance