There is a river which can be considered as an infinitely long straight line with width W.
There are A piles on the river, and B types of wooden disks are available. The location of the $i$-th pile is $(X_i, Y_i)$.
The $i$-th type of wooden disks has radius $R_i$, and its price is $C_i$ per disk.
Disks can be placed on the river such that for each wooden disk, its center must be one of the locations $(X_i, Y_i)$ of piles. We can only move on the wooden disks.
How to find the minimum cost such that we can cross the river.I am unable to approach questions like these. What would be the best method to approach this one?
I have come to realize that we can use Dijkstra's algorithm here. We treat this as a graph, with piles as the nodes. Start point can be $y=0$. and $y=W$ as the end point. But i am having implementation problems. There are multiple disks which can be used in going from on state to another. How to handle this?