add mincost-flow with dijkstra with potentials