Graduating seniors are considered to be in secondary school. Some companies are partial owners of other companies because they have acquired part of their total shares. There are at most 100 companies. The solutions for different cases must be separated with a blank record. The rectangles are put with their sides parallel to the sheet's borders.
All rectangles fall within the borders of the sheet.
As a result, different figures of different colors will be seen. White color will be represented by 1. The order of the records corresponds to the order used to put the rectangles on the sheet. Different data sets will be separated with a blank record. Calculate the area of each colored figure.