DSA Advanced Problems

Optimize Water Distribution in a Village

Model wells as virtual-source edges and minimize the total cost of supplying every house with water.