#P2885. [USACO07NOV] Telephone Wire G

    ID: 1932 Type: RemoteJudge 1000ms 125MiB Tried: 0 Accepted: 0 Difficulty: 5 Uploaded By: Tags>动态规划,dp2007USACO最短路

[USACO07NOV] Telephone Wire G

题目描述

  • Line 1: Two space-separated integers: N and C

  • Lines 2..N+1: Line i+1 contains a single integer: heighti

输入格式

  • Line 1: The minimum total amount of money that it will cost Farmer John to attach the new telephone wire.
5 2
2
3
5
1
4
15