翻译如下

来源:百度知道 编辑:UC知道 时间:2024/06/25 09:50:21
In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting the junctions. There is at most one road between any two different junctions. There is no road connecting a junction to itself. Travel time for a road is the same for both directions. At every junction there is a single traffic light that is either blue or purple at any moment. The color of each light alternates periodically: blue for certain duration and then purple for another duration. Traffic is permitted to travel down the road between any two junctions, if and only if the lights at both junctions are the same color at the moment of departing from one junction for the other. If a vehicle arrives at a junction just at the moment the lights switch it must consider the new colors of lights. Vehicles are allowed to wait at the junctions. You are given the city map which shows

the travel times for all roads (integers),
the durations of the two colors at each

在Dingilville 城市交通被安排用一个异常的方式。有连接点和路连接连接点。有至多一条路在任何二个不同连接点之间。没有路连接连接点到本身。旅行时间为路是同样为两个方向。在每个连接点有随时是或蓝色或紫色的一个唯一红绿灯。各光的颜色阶段性地交替: 蓝色为某一期间和然后紫色为其它期间。交通被允许旅行在路下在任何二个连接点之间, 如果和只如果光在两个连接点当时是同样颜色的离开一个连接点为其他。如果车当时到达在连接点灯开关它必须考虑光的新颜色。车被允许等待在连接点。您被给显示的城市地图 旅行时间为所有路(整数), 二种颜色的期间在各个连接点(整数) 并且轻和剩余时候(整数的) 最初的颜色为这种颜色改变在各个连接点。 您的任务是发现需要极小的时间从一个指定的来源连接点对一个指定的目的地连接点为车的道路当交通开始。如果超过一个这样的道路存在您被要求报告只他们的当中一个