Good day! I'm interested in the solution of the following problem via Ford-Bellman algorithm, because I only solved the one via Dijkstra. But my solution was not enough successful (4 tests of 13 passed).
Statement of the problem:
Any suggestion?
UPD I fixed error in my solution and it is Dijkstra with potentials now. After submitting, 13 tests of 13 are passed, but it work about 0.8 sec on the gentest.
Thus, the question of better solution is still open.