| 记录编号 | 
        21921 | 
        评测结果 | 
        AAATTTTTTT | 
    
    
        | 题目名称 | 
        499.牛宫 | 
        最终得分 | 
        30 | 
            
    
    
        | 用户昵称 | 
         itachi | 
        是否通过 | 
        未通过 | 
    
    
        | 代码语言 | 
        Pascal | 
        运行时间 | 
        8.358 s  | 
    
    
        | 提交时间 | 
        2010-11-15 20:56:06 | 
        内存使用 | 
        1.04 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		program t2(input,output);
var
data,h,s:array[0..200,0..200]of int64;
i,j,n,m,x,y:integer;   t,max:int64;
 procedure ss(a1,a2,b1,b2:integer);
 var
 i,j:integer;k:int64;
 begin
   t :=0;    k:=(b1+1-a1)*(b2+1-a2);
  if k< max then exit;
    for i:= a2 to b2 do
    inc(t,s[i,b1]-s[i,a1-1]);
    if t>0 then  max:=  k;
 end;
begin
assign(input,'long.in');
reset(input);
assign(output,'long.out');
rewrite(output);
readln(n,m);
fillchar(data,sizeof(data),0);
fillchar(s,sizeof(s),0);
for i:= 1 to n do
 for j:= 1 to m do
  read(data[i,j]);
close(input);
 for i:= 1 to m do
 for j:= 1 to n do
  inc(s[i,j],s[i,j-1]+data[j,i]);
max:=0;
for i:= 1 to n do
for j:= 1 to m do
 for x:=n downto i do
 for y:= m downto  j do
  begin
  if (x<i) or (y<j) then continue;
  ss(i,j,x,y);
  end;
  writeln(max);
close(output);
end.