其中leg理解为路(双向)即可。翻译链接 描述: The Slow Boat to China Shipping company needs a program to help them quickly quote costs to prospective customers. 某船需要给客户预期报价。 The cost of a shipment depends on the size of the shipment and on how many shipping legs it requires. 花费依赖于货物量和它需要 的leg数。 A shipping leg connects two warehouses, but since every pair of warehouses is not directly connected by a leg, it might require more than one leg to send a shipment from one warehouse to another. 一个leg连接两个仓库,但两个仓库之间可能需要的leg数可能要多于1个(间接相连)。 A data set can represent from 1 to 30 warehouses. A two-letter code name will identify each warehouse (capital letters only). 一个数据集合可以表示1~30个仓库,一个两个大写字母组成的名字标识了每个仓库。 Shipping legs can exist between any two distinct warehouses. leg可以在任何两个不同的仓库之间。 All legs are bidirectional. 所有的leg都是双向的。 The cost of a shipment is equal to the size of the shipment times the number of shipping legs required times $100. 一个货物的花费等于需要的leg数量乘以$100再乘以船的大小。 The input to the program identifies the warehouse code names and the existence of all shipping legs. 输入给出了所有的仓库名字和所有的leg。 For a given shipping request, consisting of the size of the shipment, the source warehouse and the destination warehouse, the program will output the
poj1529Shipping Routes(floyd)
最新推荐文章于 2020-07-30 08:32:01 发布
该程序旨在帮助航运公司快速计算货物运输成本。根据仓库数量、连接仓库的航线(leg)以及运输请求,利用Floyd算法计算最短航线和最低成本。输入包含仓库代码、航线信息和运输请求,输出最佳成本或表明无法完成运输。
摘要由CSDN通过智能技术生成