摘要:
#include #include #include #define MAXLEN 1005 #define inf 1> b >> e >> v; map[b][e] = map[e][b] = v; } } bool SPFA(int x, int n) { queue Q; memset(vis,0,sizeof(vis)); mem... 阅读全文
摘要:
#include "iostream" #include "cstdio" #include "queue" #include #include #include "algorithm" using namespace std; #define Maxn 1005 #define inf 1 Q; memset(vis, 0, sizeof(vis)); memset(inq... 阅读全文
摘要:
#include using namespace std; const int Max=99999999; int map[105][105]; int d[105]; int middist; bool s[105]; void dijkstra(int n,int m) { for(int i=1;i>N>>M&&N!=0&&M!=0) { for(int ... 阅读全文
摘要:
#include #include #include #include #include #define N 110 #define INF 0x7ffffff using namespace std; int n,val[N],mp[N][N],d[N],v[N],num[N],r[N][N]; void floyd() { for(int k=1;k q; q.push(s... 阅读全文