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张图片-东莞河马信息技术 HBC24972[网络流24题]数字梯形问题[USACO 2008 Oct G]Watering Hole题解
-第1张图片-东莞河马信息技术](https://www.xxstcz.com/zb_users/upload/2023/11/20231114100901169992774162267.jpeg)