求一段英语翻译 只有50分了 感谢 50
PROBLEMTHREE:TRAINSThelocalcommuterrailroadservicesanumberoftownsinKiwiland.Becauseof...
PROBLEM THREE: TRAINS
The local commuter railroad services a number of towns inKiwiland. Because of monetary concerns, all of the tracks are 'one-way.' That is, a route from Kaitaia to Invercargill does not imply theexistence of a route from Invercargill to Kaitaia. In fact, even if bothof these routes do happen to exist, they are distinct and are not necessarilythe same distance!
The purpose of this problem is to help the railroadprovide its customers with information about the routes. In particular,you will compute the distance along a certain route, the number of differentroutes between two towns, and the shortest route between two towns.
Input: A directed graph where a node represents atown and an edge represents a route between two towns. The weighting ofthe edge represents the distance between the two towns. A given routewill never appear more than once, and for a given route, the starting and endingtown will not be the same town.
Output: For test input 1 through 5, if no such routeexists, output 'NO SUCH ROUTE'. Otherwise, follow the route as given; donot make any extra stops! For example, the first problem means to startat city A, then travel directly to city B (a distance of 5), then directly tocity C (a distance of 4). 展开
The local commuter railroad services a number of towns inKiwiland. Because of monetary concerns, all of the tracks are 'one-way.' That is, a route from Kaitaia to Invercargill does not imply theexistence of a route from Invercargill to Kaitaia. In fact, even if bothof these routes do happen to exist, they are distinct and are not necessarilythe same distance!
The purpose of this problem is to help the railroadprovide its customers with information about the routes. In particular,you will compute the distance along a certain route, the number of differentroutes between two towns, and the shortest route between two towns.
Input: A directed graph where a node represents atown and an edge represents a route between two towns. The weighting ofthe edge represents the distance between the two towns. A given routewill never appear more than once, and for a given route, the starting and endingtown will not be the same town.
Output: For test input 1 through 5, if no such routeexists, output 'NO SUCH ROUTE'. Otherwise, follow the route as given; donot make any extra stops! For example, the first problem means to startat city A, then travel directly to city B (a distance of 5), then directly tocity C (a distance of 4). 展开
2个回答
展开全部
问题三:火车
当地的通勤铁路只在几维岛的若干城镇开通。由于资金问题,所有铁路轨道都是‘单向道’。即,有一条从凯塔亚通到因弗卡吉尔的铁路并不意味着会有一条从因弗卡吉尔通到凯塔尔的铁路。事实上,即使凯塔亚到因弗卡吉尔的互通的两条铁路恰巧存在,这两条铁路也是不同的并且可能长度也不同!
提出该问题旨在于帮助铁路部门向乘客提供相关的铁路信息。尤其是,当你要计算某段路线的长度、联通两城镇间的路线数量及两城镇间最短路线时。
输入:有向图,每个节点代表一个城镇,边缘代表两城镇间的铁路路线。边缘的权重代表两城镇间的距离。一条给定的路线不会只出现一次,并且该路线的起始点和终点不会是相同的城镇。
输出:测试时,输入从1到5,如果没有出现相应的路线,会输出‘没有该路线’。相反,要遵循给定路线;不要有多余的停留点!例如:第一个问题是从A城出发,然后直接到B城(距离为5),之后直接到C城(距离为4)。
当地的通勤铁路只在几维岛的若干城镇开通。由于资金问题,所有铁路轨道都是‘单向道’。即,有一条从凯塔亚通到因弗卡吉尔的铁路并不意味着会有一条从因弗卡吉尔通到凯塔尔的铁路。事实上,即使凯塔亚到因弗卡吉尔的互通的两条铁路恰巧存在,这两条铁路也是不同的并且可能长度也不同!
提出该问题旨在于帮助铁路部门向乘客提供相关的铁路信息。尤其是,当你要计算某段路线的长度、联通两城镇间的路线数量及两城镇间最短路线时。
输入:有向图,每个节点代表一个城镇,边缘代表两城镇间的铁路路线。边缘的权重代表两城镇间的距离。一条给定的路线不会只出现一次,并且该路线的起始点和终点不会是相同的城镇。
输出:测试时,输入从1到5,如果没有出现相应的路线,会输出‘没有该路线’。相反,要遵循给定路线;不要有多余的停留点!例如:第一个问题是从A城出发,然后直接到B城(距离为5),之后直接到C城(距离为4)。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
问题三:培训当地的通勤铁路服务的一些城镇inkiwiland。由于货币的担忧,所有的曲目是“单向”。即,路线从凯塔亚到因弗卡吉尔并不意味着从因弗卡吉尔路线存在的凯塔亚。事实上,即使对这些路线的确存在,它们是不同的,不necessarilythe相同的距离!这个问题的目的是帮助railroadprovide其对线路信息的客户。特别是,您将计算沿某条路线的距离,两个城市之间的最短differentroutes数,和两个城市之间的航线。输入:一个有向图,节点代表一个和边缘代表两个城镇之间的路线。加权的边代表两个城镇之间的距离。一个给定的routewill不会出现超过一次,和一个给定的路线,起点和endingtown不会是同一个镇。输出:测试输入1到5,如果没有这样的routeexists,输出“没有这样的路线。否则,按照给定的;你做任何额外的停止!例如,第一个问题就是站在城市,然后直接前往城市B(5距离),然后直接城市C(4距离)。 求采纳,打字手痛
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |