Highways Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23033 Accepted: 10612 Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Fl
Networking Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19674 Accepted: 10061 Description You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of
1.dijkstra 时间复杂度:O(n^2) n次迭代,每次找到距离集合S最短的点 每次迭代要用找到的点t来更新其他点到S的最短距离. #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=510; int g[N][N]; int dis[N],n,m;//dis[i]表示节点i到初始点的最短距离 bool st[N]; int dijkst