package main import ( "fmt" ) func main() { // m行 n列 var m, n int fmt.Scan(&m, &n) vals := make([][]int, m) for i := range vals { vals[i] = make([]int, n) for j := range vals[i] { fmt.Scan(&vals[i][j]) } } // 最短路径,广搜即可 queue := []*MyPoint{{ x: 0, y: 0, }}...