比赛 |
20110725 |
评测结果 |
AAAATAAAET |
题目名称 |
失落的猴子 |
最终得分 |
70 |
用户昵称 |
ZhouHang |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2011-07-25 11:35:45 |
显示代码纯文本
Program losttemple;
Const
inf = 'lostmonkey.in';
ouf = 'lostmonkey.out';
Var
i,j,k,x1,x2,y1,y2,n,m,kk,l : longint;
a : array [0..1010,0..1010] of longint;
Procedure Swap(Var x1,x2,y1,y2 : longint);
Var
tmp : longint;
Begin
if x1>x2 then begin
tmp := x1; x1 := x2; x2 := tmp;
end;
if y1>y2 then begin
tmp := y1; y1 := y2; y2 := tmp;
end;
End;
Begin
Assign(input,inf); Reset(input);
Assign(output,ouf); Rewrite(output);
readln(n,m,kk);
fillchar(a,sizeof(a),0);
for i := 1 to kk do
begin
readln(x1,y1,x2,y2,l);
Swap(x1,x2,y1,y2);
for j := x1 to x2 do
for k := y1 to y2 do
a[j,k] := 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.