可以从后向前遍历: x[i] < x[i+1] 时 dp[i] = dp[i+1]+1 x[i] == x[i+1]时 dp[i] = dp[i+1] x[i] > x[i+1] 时 dp[i] = 遍历i+2----n 有多少楼数高度大于x[i],就能看到多少个