#P2885. [USACO07NOV] Telephone Wire G

[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