题目:click here 题意: 有n个城市,m条道路,在每条道路上有一个承载量,现在要求从1到n城市最大承载量,而最大承载量就是从城市1到城市n所有通路上的最大承载量.分析: 其实这个求最大边可以近似于求最短路,只要修改下找最短路更新的条件就可以了. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #i…
http://poj.org/problem?id=1797 给定n个点,及m条边的最大负载,求顶点1到顶点n的最大载重量. 用Dijkstra算法解之,只是需要把“最短路”的定义稍微改变一下, A到B的路长定义为路径上边权最小的那条边的长度, 而最短路其实是A到B所有路长的最大值. #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<alg…
Heavy Transportation Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 22440   Accepted: 5950 Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man…
题意 : 找出 1 到 N 点的所有路径当中拥有最大承载量的一条路,输出这个最大承载量!而每一条路的最大承载量由拥有最大承载量的那一条边决定 分析 : 与 POJ 2253 相似且求的东西正好相反,属于求从一个指定起点到终点的所有路径当中拥有最大or最小的边是什么.只要改变一下 Dijkstra 中 DP 的意义 ==> Dis[i] 表示起点到 i 点的所有路径当中拥有最大or最小的边的权值.当然也可以使用最小生成树做法,但是这里的边应该是从大排到小,其他的都和 POJ 2253 一模一样了!…
POJ.1797 Heavy Transportation (Dijkstra变形) 题意分析 给出n个点,m条边的城市网络,其中 x y d 代表由x到y(或由y到x)的公路所能承受的最大重量为d,求从1到n的所有通路中,所能经过的的最大重量的车为多少. 2. 代码总览 #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #include <stack&…
POJ 1797 Heavy Transportation / SCU 1819 Heavy Transportation (图论,最短路径) Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there reall…
poj 1797 Heavy Transportation Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has…
原题链接:http://poj.org/problem?id=1797 Heavy Transportation Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 24576   Accepted: 6510 Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand…
题目链接:http://poj.org/problem?id=1797 Heavy Transportation Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 39999   Accepted: 10515 Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand…
题目链接:http://poj.org/problem?id=1797 Heavy Transportation Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 30840   Accepted: 8191 Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand…