, start_x, start_y, 1, a, b, &mut visited);
let p3 = f(&map, start_x, start_y, 2, a, b, &mut visited...2, a, b, visited);
let p3 = f(&map, si, sj + 1, 3, a, b, visited);
let p0 = if d !...数组
visited := make([][][]bool, n)
for i := range visited {
visited[i] = make([][]bool, m)...for j := range visited[i] {
visited[i][j] = make([]bool, 4)
}
}
// 计算从四个方向到达终点的最短距离...)
p[1] = f(mapData, si+1, sj, 1, a, b, visited)
p[2] = f(mapData, si, sj-1, 2, a, b, visited)
p