文章
10
粉丝
76
获赞
78
访问
4.0k
#include <iostream>
#include <queue>
using namespace std;
#define INF 0x3f3f3f3f
const int N = 1005;
struct Edge {
int b, c;
};
int n, m;
void floyd(int d[105][105]) {
for (int k = 1; k <= n; k++) {
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
}
}
}
}
int main() {
while (cin >> n >> m && n && m) {
int d[105][105] = {};
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
if (i == j)
...
登录后发布评论
暂无评论,来抢沙发