比赛 20110725 评测结果 AAAAAAAATT
题目名称 失落的猴子 最终得分 80
用户昵称 WSJZX 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2011-07-25 11:40:18
显示代码纯文本
program lostmonkey;
  var
    i,j,n,m,t,total,ans,x1,x2,x3,x4,y1,y2,y3,y4,x,y,k,l:longint;
    a:array[1..1000,1..1000] of longint;
  begin
    assign(input,'lostmonkey.in');reset(input);
    assign(output,'lostmonkey.out');rewrite(output);
    fillchar(a,sizeof(a),0);
    readln(n,m,k);
    for i:=1 to k do
      begin
        readln(x1,y1,x2,y2,l);
        if x1>x2 then begin x3:=x1; x4:=x2; end
                 else begin x3:=x2; x4:=x1; end;
        if y1>y2 then begin y3:=y1; y4:=y2; end
                 else begin y3:=y2; y4:=y1; end;
        for j:=x4 to x3 do
          for t:=y4 to y3 do
            a[j,t]:=l;
      end;
    for i:=1 to n do
      begin
        for j:=1 to m do
          write(a[i,j]);
        writeln;
      end;
    close(input);close(output);
  end.