裸的最短路 dijkstra #include<cstdio> #include<string> #include<cstring> #include<iostream> using namespace std; const int MAXN = 101; const int INF = 0x3f3f3f3f; int dist[MAXN], vis[MAXN], mat[MAXN][MAXN]; int main(){ int t, u, v, w, n,…
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1019 题目大意:Tanvir想从节点1的位置走到节点n的位置, 输出最短距离, 如果不存在输出"Impossible". 解题思路:dijkstra模版题 代码如下: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int INF = 0x3f3f3f3f;…
Aladdin and the Flying Carpet Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice LightOJ 1341 Appoint description: System Crawler (2016-07-08) Description It's said that Aladdin had to solve seven myst…