Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46784 yuzhengxun 最大空白区 C++ 运行超时 1000 MS 232 KB 557 2024-05-05 11:55:30

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int n,m; int maxn=-1; int a1[35][35]; cin>>n>>m; 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 tmp=0; for(int x=i;x>=0;x--){ for(int y=j;j>=0;j--){ int s=0; for(int a=i;a>=x;a--){ for(int b=j;b>=y;b--){ s+=a1[a][b]; } } if(s==0){ tmp=(i-x+1)*(j-y+1); if(tmp>maxn)maxn=tmp; } } } } } cout<<maxn; return 0; }


测评信息: