阅读程序第二题解析 #include <iostream> #include <vector> using namespace std; int compute(vector<int>& cost) { int n = cost.size(); vector<int> dp(n + 1, 0); dp[1] = cost[0]