比赛 10101115 评测结果 WWWEEEEEEE
题目名称 牛宫 最终得分 0
用户昵称 Des. 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2010-11-15 09:44:36
显示代码纯文本
program long;
var a:array[0..70,0..70,0..70,0..70]of integer;
    b:array[0..70,0..70]of longint;
    t,k,m,n,i,j,max:longint;
begin
assign(input,'long.in');
reset(input);
assign(output,'long.out');
rewrite(output);
readln(m,n);
for t:=1 to m do
  begin
    for k:=1 to n do
      begin
        read(b[t,k]);
        a[t,1,t,k]:=a[t,1,t,k-1]+b[t,k];
      end;
    readln;
  end;
for t:=1 to m  do
  for k:=1 to n do
    for i:=t to m do
      for j:=k to n do
        begin
          a[t,k,i,j]:=a[t,k,i-1,j]+a[i,1,i,j]-a[i,1,i,k-1];
          if (a[t,k,i,j]>0)and((i-t+1)*(j-k+1)>max) then
            max:=(i-t+1)*(j-k+1);
        end;
writeln(max);
close(output);
end.