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