#3754. [Ceoi2009]logs
[Ceoi2009]logs
Description
有一个N*M的01矩阵,现在你可以的任意交换其中的列,要求找一个最大的仅由1组成的矩阵。 N<=15000,M<=1500 1 ≤ N ≤ 15000 1 ≤ M ≤ 1500 30% of the test cases will have N,M ≤ 1024
Format
Input
N,M 以下N行每行M个字符。
Output
Samples
10 6
001010
111110
011110
111110
011110
111111
110111
110111
000101
010101
21
Limitation
By permuting the columns such that columns 2, 4 and 5 are adjacent you have a rectangle of area 21 (rows 2-8 and columns 2, 4, 5).