Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46789 Xiyou 最大空白区 C++ 解答错误 0 MS 244 KB 536 2024-05-05 11:57:18

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n,m; int ma=-1; int a1[31][31]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a1[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ int t=0; for(int x=i;x>=0;x--){ for(int y=j;y>=0;y--){ int sum=0; for(int a=i;a>=x;a--){ for(int b=j;b>=y;b--){ sum+=a1[a][b]; } } if(sum==0){ t=(i-x+1)*(j-y+1); } if(t>ma){ ma=t; } } } } } cout<<ma; }


测评信息: