文章
71
粉丝
142
获赞
5
访问
50.7k
#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[100000];
void dij(int s,int n) {
priority_queue<point> mq;
fill(dis, dis + maxn,INT_MAX);
for (int i = 0; i < maxn;i++) {
&...
登录后发布评论
暂无评论,来抢沙发