错误答案

program lx;

const

dx :array[1..8]of integer=(-2,-2,-1,1,2,2,1,-1);

dy :array[1..8]of integer=(-1,1,2,2,1,-1,-2,-2);

var

a :array[0..16,0..16]of longint;

i,j :longint;

c,d :longint;

x1,x2 :longint;

y1,y2 :longint;

tx,ty :longint;

procedure search(x,y:longint);

begin

if (x=x1) and(y=y1) then begin

inc(c);

for i:=0 to 15 do begin

for j:=0 to 15 do begin

write(a:2);

end;

writeln;

end;

writeln;

exit;

end;

if a[x,y]=2 then begin

exit;

end;

a[x,y]:=1;

if (x+1=0) then

search(x+1,y)

else exit;

if (y+1>=0)and (y+1=0) and (tx=0) and(ty

1 条评论

  • 1

信息

ID
1121
难度
4
分类
动态规划 点击显示
标签
递交数
9572
已通过
3779
通过率
39%
被复制
23
上传者