void Knight(int i , int j)
{
// printf("%d %dn",i,j)
if (board[i][j] != 0 || i < 0 || i >= Size || j < 0 || j >= Size )
{
return
}
step++
board[i][j]=step
if (step == Size*Size)
{
showboard()
system("PAUSE")
return
}
//DFS
Knight(i-2,j-1) //left
Knight(i-2,j+1)
Knight(i+2,j-1) //right ...
/dl/393662.html
标签:
int
Knight
printf
board
上传时间:
2014-01-17
上传用户:cxl274287265