package main import ( "fmt" ) func main() { var n int var dp []int for { _, err := fmt.Scan(&n) if err != nil { break } dp = make([]int, n) for i := 0; i < n; i++ { fmt.Scan(&dp[i]) } fmt.Println(hechangdui(dp)) } } func hechangdui(s []int) int { dp1, dp2 := make([]int, len(s)), make([]in...