UVA104 - Arbitrage

graph theory, all-pairs shortests paths, APSP, negative weight cycle,
Floyd-Warshall (modified relaxation operation).