L2-001 紧急救援 (25 分) (Dijkstra应用)
题目链接
最开始这题没有写对,找了半天错误,以为Dijkstra函数写错了,最后发现没有将矩阵初始化为INF。。。真令人头大。
#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
int N,M,S,D;
int mapp[510][510]; //邻接矩阵
int nums[510]; ...
原创
2019-01-12 16:36:02 ·
3699 阅读 ·
2 评论