文章
72
粉丝
142
获赞
5
访问
54.9k
#include<iostream>
#include<vector>
#include<queue>
#include<climits>
#include<string>
#include<cstring>
using namespace std;
struct edge {
int to;
int length;
};
struct point {
int number;
int distance;
bool operator<(const point& p)const {
return distance > p.distance;
}
};
struct edge_s {
int from;
int to;
int weight;
int status;//1打开,0关闭
};
const int maxn = 55+5;
vector<edge> graph[maxn];
vector<edge_s> g1;
int dis[maxn];
int vis[maxn];//设置访问位 只被访问一次
int K[1000];
void dij(int s,int n) {
priority_queue<point> mq;
fill(dis, dis + maxn,INT_MAX);
for (int i = 0; i < maxn;i++) {
&nb...
登录后发布评论
容器的初始化格式不对
g1.clear()