比赛 |
20120705 |
评测结果 |
C |
题目名称 |
绘画 |
最终得分 |
0 |
用户昵称 |
SnowDancer |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2012-07-05 11:16:40 |
显示代码纯文本
program drawing;
var
now:array[1..100,1..100] of longint;
last:array[1..4000,1..100,1..100] of longint;
n,i,j,k,l,tot,color,m,x1,x2,y1,y2:longint;
c,u:char;
begin
assign(input,'drawing.in'); reset(input);
assign(output,'drawing.out');rewrite(output);
readln(n,color,m);
for i:=1 to n do
for j:=1 to n do
now[i,j]:=1;
repeat
dec(m);
read(c);repeat read(u); until (u=' ') or eoln;
case c of
'P':begin
readln(color,x1,y1,x2,y2);
for i:=x1+1 to x2+1 do
for j:=y1+1 to y2+1 do
if (i+j) and 1=(x1+y1) and 1 then
now[i,j]:=color;
end;
'S':begin
readln;
inc(tot);last[tot]:=now;
end;
'L':begin
readln(k);
now:=last[k];
end;
end;
until m=0;
for i:=1 to n do begin
for j:=1 to n-1 do
write(now[i,j],' ');
writeln(now[i,n]);
end;
close(input);close(output);
end.