题目#define _CRT_SECURE_NO_WARNINGS#include#include#includeconst int MAXN=1010; #define typec int const typec INF=0x3f3f3f3f;//防止后面溢出,这个不能太大 bool vis[MAXN]; int pre[MAXN];typec cost[MAXN][MAXN];typec lowcost[MAXN];void Dijkstra(int n,int beg) { for(int i=1;ic) cost[a][b]=cost... Read More
posted @ 2014-02-09 22:28 laiba2004 Views(171) Comments(0) Diggs(0) Edit
题目题目很简单,只是多了对地名转化为数字的处理,好吧,这我也是参考网上的处理办法,不过大多数的人采用map来处理注意初始化注意范围,不然会wa!!!(这是我当时wa的原因org)大家容易忽视的地方——双向边,起点等于终点(虽然我当时都考虑到了)#define _CRT_SECURE_NO_WARNINGS#include#include#includeconst int MAXN=155; #define typec int const typec INF=0x3f3f3f3f;//防止后面溢出,这个不能太大 bool vis[MAXN]; int pre[MAXN];typec c... Read More
posted @ 2014-02-09 16:00 laiba2004 Views(158) Comments(0) Diggs(0) Edit