In accordance with IOI rules, all students must be in secondary school and be 19 years of age or younger on July 3, 1994. Graduating seniors are considered to be in secondary school. 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.