Hey everyone. I'm trying to solve a problem from one of my country's old national contests: UVa 12319. What I did is to build both graphs, run Floyd-Warshall's on both and then check if it's valid or not. Here's my code (boolean p is to print some debug info).
I'm getting WA as veredict. Any help? Thanks!
On Line 51, you write
This should be