| 比赛 | 
    10101115 | 
    评测结果 | 
    WWWWWWWWWW | 
    | 题目名称 | 
    牛宫 | 
    最终得分 | 
    0 | 
    | 用户昵称 | 
    maxiem | 
    运行时间 | 
    0.000 s  | 
    | 代码语言 | 
    Pascal | 
    内存使用 | 
    0.00 MiB  | 
    | 提交时间 | 
    2010-11-15 10:46:59 | 
显示代码纯文本
program long;
var
  i,j,a,b,k,n,m:integer;
  calc,table:array [0..200,0..200] of longint;
  ans,time,sum:longint;
procedure print;
begin
  writeln (ans);
  close (output);
  halt;
end;
begin
  assign (input,'long.in');
  reset (input);
  assign (output,'long.out');
  rewrite (output);
  readln (n,m);
  for i:=1 to n do begin
    for j:=1 to m do read (table[i,j]);
	readln;
  end;
  fillchar (calc,sizeof(calc),0);
  for i:=1 to m do begin
    calc[i,1]:=table[1,i];
    for j:=2 to n do begin
	  calc[i,j]:=calc[i,j-1]+table[j,i];
	end;
  end;
  time:=0;
  for i:=1 to n do begin
    for a:=1 to m do begin
      for j:=n downto 1 do begin
          for b:=m downto 1 do begin
                  sum:=0;
		  for k:=a to b do begin
                    sum:=sum+calc[k,j]-calc[k,i-1];
                    inc(time);
                    if time>10000000 then print;
                  end;
		  if sum>0 then begin
                    if (j-i+1)*(b-a+1)>ans then ans:=(j-i+1)*(b-a+1);
                  end;
                end;
	  end;
	end;
  end;
  close (input);
  writeln (ans);
  close (output);
end.