- 0of 0 votes
There is a lake, some hills and a dam. Also all these are at some heights (heights may/may not be same) which are also present. Hills numbered 0-9 (assuming for heights).
You can increase or decrease the heights of the hills and dam but not the river. The problem is to find the least cost to make a path from the lake to the dam through the hills. Also, height of A >= height of B for the water to flow.