#include<iostream>
using namespace std;
const int maxn = 1000;
const int maxe = 100000;
typedef struct Edge {
int u, v; // 起点,终点
int weight; // 权值
}Edge;
Edge edge[maxe]; // 保存边的值
int dist[maxn]; // 结点到顶点的最小距离
int nodenum, edgenum, source; // 结点数,边数,顶点
void init() {
// 建图
cin >> nodenum >> edgenum >> source;
Bellman-Ford
最新推荐文章于 2024-04-17 16:21:42 发布