摘要:
题意:求最出小环,输出路径#include #includeusing namespace std;#define N 110#define INF 0xffffffint map[N][N],n,m,dist[N][N],pre[N][N],path[N];/* run this program using the console pauser or add your own getch, system("pause") or input loop */void floyd(){ int i,j,k,ans=INF,num,p; for(i=0;idist[i][k]+d 阅读全文
posted @ 2013-07-31 11:04
Teemo的技术blog
阅读(64)
评论(0)
推荐(0)
摘要:
#include #includeusing namespace std;#define N 110#define INF 0xffffffint map[N][N],n,m,dist[N][N];/* run this program using the console pauser or add your own getch, system("pause") or input loop */void floyd(){ int i,j,k,ans=INF; for(i=0;id) map[a-1][b-1]=map[b-1][a-1]=d; } floyd(); } re 阅读全文
posted @ 2013-07-31 10:08
Teemo的技术blog
阅读(107)
评论(0)
推荐(0)