本题虽然为bfs,但dfs也可以过,记录每次到达(x,y)时step的值,然后如果比之前小就直接舍去了,再然后棋盘最大450*450那么极限状态下step大约250步,大于的就直接剪掉 ```c
if(step>250)
return;
if(w[x][y]<=step)
w[x][y]=step;