记录编号 22003 评测结果 AATTTTTTTA
题目名称 剪切矩形 最终得分 30
用户昵称 Gravatarmagic 是否通过 未通过
代码语言 Pascal 运行时间 7.102 s
提交时间 2010-11-16 15:07:29 内存使用 1.07 MiB
显示代码纯文本
program gls;
var
a,b,i,j,k,l,max:longint;
ss:array[1..1000,1..1000]of char;
c:char;
f,g:text;
     procedure success(x,y,xx,yy:longint);
     var p,q:longint;flag:longint;
     begin  flag:=0;
         for p:=x to xx do
        begin for q:=y to yy do
          if ss[p,q]='*' then begin inc(flag);exit;end;
        end;
        if flag=0 then inc(max);
        {if flag=0 then writeln(g,x,' ',y,'  ',xx,' ',yy); }
     end;

begin
   assign(f,'rectangle.in');
   reset(f);
   assign(g,'rectangle.out');
   rewrite(g);
   readln(f,a,b);
   for k:=1 to a do
 begin  for l:=1 to b do
   begin
    read(f,c);
    ss[k,l]:=c;
   end;
   readln(f);
 end;
   max:=0;
   for i:=1 to a do
    for j:=1 to b do
     for k:=i to a do
      for l:=j to b do
   begin success(i,j,k,l) end;




writeln(g,max);
close(g);close(f);

end.