def tc(i,j):
if i<0 or i>8 or j>8 or j<0 or lst[i][j] != 0 or ls[i][j] == 1:
if i>=0 and i<=8 and j<=8 and j>=0 and lst[i][j]!=-1:
ls[i][j] = 1
return 0
ls[i][j] = 1
print(i,j)
tc(i-1,j)
tc(i+1,j)
tc(i,j-1)
tc(i,j+1)
扫雷揭开空白部分
最新推荐文章于 2024-07-25 21:13:04 发布