摘要:
/*思路:定义dp[i]表示到达第i站的最小花费。所以 dp[i] = min(dp[i-1] + Cx, dp[i-1] + Cx, dp[i-3] + Cx...(直到i 和 (i-x) 两站的距离大于L3);*//*My Code:*/#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int N = 10007;const int inf = 0x7fffffff;int dis[N];int dp[N];int main() { //freo 阅读全文