Fixed shortest-distance finding cycle