package main import "fmt" func main() { // n var n int fmt.Scan(&n) // 高度数组 var h = make([]int, n) for i := 0; i < n; i++ { var temp int fmt.Scan(&temp) h[i] = temp } left := make([]int, n) right := make([]int, n) for i := 0; i < n; i++ { left[i] = -1 right[i] = -1 } st...