# 这种程序都有错？

program pp;

var

i,j,k,m,n,maxx,maxy,minx,miny,p,t,o:longint;

map:array[0..1024,-2048..0] of char;

begin

map[1,-1]:='/';map[2,-2]:='/';map[2,-1]:='_';maxx:=2;miny:=-2;

for p:=1 to n-1 do

begin

t:=maxx;maxx:=maxx*2;k:=miny;miny:=miny*2;

for i:=t+1 to maxx do

begin

for j:=miny to k-1 do

map:=map;

o:=k;

for j:=k to -1 do

begin

o:=o-1;

case map of

'\':map:='/';

'/':map:='\';

'_':map:='_';

end;

end;

end;

end;

for i:=1 to maxx do

begin

for j:=miny to -1 do write(map);

for j:=-1 downto miny do

begin

case map of

'\':write('/');

'/':write('\');

'_':write('_');

end;

if not((map='\')or(map='/')or(map='_')) then

write(' ');

end;

writeln;

end;

end.

# 2 条评论

• @ 2009-07-09 12:47:01

注意初始化！！！

Pascal:

FillChar(f, SizeOf(f), ' ');

• @ 2009-07-09 12:30:56

Me, too.

我的简要主程序：

Procedure Print(Px, Py: LongInt);

Begin

f[Px, Py] := '\'; f[Px-1, Py-1] := '\';

f[Px, Py-1] := '_'; f[Px, Py-2] := '_';

f[Px, Py-3] := '/'; f[Px-1, Py-2] := '/';

End;

Procedure Main(Num, Rx, Ry: LongInt);

Begin

If Num > 1 Then

Begin

Main(Num Div 2, Rx - Num, Ry - Num);

Main(Num Div 2, Rx, Ry - (Num * 2));

Main(Num Div 2, Rx, Ry);

End Else Print(Rx, Ry);

End;

就是过不了。

到底为什么？？？

• 1

ID
1167

3

1254

632

50%

4