folyd专题

uva 10985 - Rings'n'Ropes( 最短路Folyd)

题目连接:uva 10985 - Rings'n'Ropes 题目大意:给出n和m,表示有n个戒指和m条绳子,每条绳子的长度为1,给出每根绳子连接的戒指,然在左右手各握住一个戒指,拉直,问说最多有多少个绳子被绷直。 解题思路:首先先用Floyd算法将每两个戒指之间的最短距离求出(因为向两端扯的时候,最大距离便是连接两个戒指的最短距离),然后枚举两枚戒指,找出中间所有的点(f[x][

POJ1860 Currency Exchange(正权环,folyd)

题目: Currency Exchange Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 28540 Accepted: 10657 Description Several currency exchange points are working in our city. Let us suppose that

URAL1004 Sightseeing Trip(Folyd求最小环,打印路径)

题目: 1004. Sightseeing Trip Time limit: 0.5 second Memory limit: 64 MB There is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other a