#include<iostream>usingnamespace std;/// <summary>/// 二维数组,求最大子矩阵面积/// </summary>/// <returns></returns>intmain(){int m, n,tmp;int arr[21][21]={0};
cin >> m >> n;for(int i =0; i < m; i++){for(int j =0; j < n; j++){
cin >> tmp;if(tmp ==0)
arr[i][j]=1;}}for(int i =0; i < m; i++){//每行连续长度,for(int j =1; j < n; j++){if(arr[i][j]==1)
arr[i][j]= arr[i][j-1]+1;}}int max =0;//最大值int area;//面积int length, width;for(int i =0; i < m; i++){for(int j =0; j < n; j++){if(arr[i][j]!=0){//搜索每行
width =1;
length = arr[i][j];
area = length * width;
max = max > area ? max : area;int minlength = arr[i][j];for(int k = i -1; k >=1; k--){//搜索列if(arr[k][j]==0)break;//保存较小值
minlength = arr[k][j]> minlength ? minlength : arr[k][j];
length = arr[k][j]< arr[i][j]? arr[k][j]: arr[i][j];
width++;
area = minlength * width;
max = max > area ? max : area;}}}}
cout << max << endl;return0;}