Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。 每组数据第一行包含两个正整数N和M(0 2 const int MAX = 10000; 3 int n,m,map[200][200]; 4 5 int Dijkstra(int s,int e) 6 { 7 if(s==e) 8 ... Read More
posted @ 2013-07-18 15:59 瓶哥 Views(217) Comments(0) Diggs(0)