P3062 [USACO12DEC] Wifi Setup S

题目描述

Farmer John's N cows (1

输入格式

\* Line 1: Three space-separated integers: N A B (0

输出格式

\* Line 1: The minimum cost of providing wireless coverage to all cows.

说明/提示

There are 3 cows at positions 7, 0, and 100. Installation of a base station of power r costs 20 + 5\*r. The optimal solution is to build a base station at position 3.5 (with power 3.5) and another at position 100 (with power 0). The first base station covers cows 1 and 2, and the second covers cow 3.