hdu 1874. Shortest Path. Floyd algorithm (Still, Dijkstra should be the fastest)