HBC24972[网络流24题]数字梯形问题[USACO 2008 Oct G]Watering Hole题解

爱的那么颓废 算法基础篇 47 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Farmer John has decided to bring water to his N (1

Farmer John has decided to bring water to his N (1 <= N <= 300) pastures which are conveniently numbered 1..N. He may bring water to a pasture either by building a well in that pasture or connecting the pasture via a pipe to another pasture which already has water. Digging a well in pasture i costs Wi (1 <= Wi <= 100,000). Connecting pastures i and j with a pipe costs P_{ij} P ij ​ (1 <= P_{ij} P ij ​ <= 100,000; P_{ij} P ij ​ = P_{ji} P ji ​ ; P_{ii} P ii ​ =0). Determine the minimum amount Farmer John will have to pay to water all of his pastures. POINTS: 400

HBC24972[网络流24题]数字梯形问题[USACO 2008 Oct G]Watering Hole题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC24972[网络流24题]数字梯形问题[USACO 2008 Oct G]Watering Hole题解