比赛 |
10101115 |
评测结果 |
TTTTTTTTTT |
题目名称 |
牛宫 |
最终得分 |
0 |
用户昵称 |
itachi |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2010-11-15 11:15:19 |
显示代码纯文本
program t2(input,output);
var
data:array[1..200,1..200]of longint;
i,j,n,m,x:integer; max:longint;
procedure ss(a,b:integer);
var
x,y,i,j:integer; temp:longint;
function check(a,b,i,j:integer):boolean;
var
o,ii,jj:longint;
begin
check:=false;
o:=0; temp:=0;
for ii:= a to i do
for jj:= b to j do
begin
inc(o,data[ii,jj]);
inc(temp);
end;
if o>0 then check:=true;
end;
begin
for i:=a to n do
for j:=b to m do
if (check(a,b,i,j))and(temp>max) then max:=temp;
end;
begin
assign(input,'long.in');
reset(input);
assign(output,'long.out');
rewrite(output);
readln(n,m);
fillchar(data,sizeof(data),0);
for i:= 1 to n do
for j:= 1 to m do
read(data[i,j]);
close(input); max:=0;
for i:= 1 to n do
for j:= 1 to m do
ss(i,j);
writeln(max);
close(output);
end.