[Ceoi2009]logs

时间限制:10s    【提交】    空间限制:64MB

题目描述

有一个N*M的01矩阵,现在你可以的任意交换其中的列,要求找一个最大的仅由1组成的矩阵。 N<=15000,M<=1500 1 ≤ N ≤ 15000 1 ≤ M ≤ 1500 30% of the test cases will have N,M ≤ 1024


输入格式

N,M 以下N行每行M个字符。


输出格式


样例输入

10 6 
001010 
111110 
011110 
111110 
011110 
111111 
110111 
110111 
000101 
010101 

样例输出

21

提示

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).


题目来源

没有写明来源