比赛 |
10101115 |
评测结果 |
TTTTTTTTTT |
题目名称 |
牛宫 |
最终得分 |
0 |
用户昵称 |
1102 |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2010-11-15 08:52:11 |
显示代码纯文本
program xxxx;
var w,n,m,i,i1,j,j1:longint;
a:array[1..200,1..200] of real;
function pd(x1,x2,x3,x4:longint):boolean;
var p,q:longint;
x:real;
begin
x:=0;
for p:=x1 to x3 do
for q:=x2 to x4 do
x:=x+a[p,q];
if x>0 then
pd:=true
else
pd:=false;
end;
function max(x,y:longint):longint;
begin
if x>y then
max:=x
else
max:=y;
end;
begin
assign(input,'long.in');
reset(input);
assign(output,'long.out');
rewrite(output);
read(n,m);
w:=0;
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
for i:=1 to n do
for i1:=1 to m do
for j:=i to n do
for j1:=i1 to m do
begin
if pd(i,i1,j,j1) then
w:=max(w,(j-i+1)*(j1-i1+1));
end;
write(w);
close(input);
close(output);
end.