SPOJ_FISHER based on Floyd Warshall