The output consists of two lines for each run. The first line of each run contains the best possible route for the passenger as a list of station identifiers separated by spaces. The second line contains the probability that the passenger, when following the given route, arrives on time.The probability must be formatted as a decimal real number with exactly one digit before the decimal point, and exactly 4 digits after. The usual rules for rounding apply: round up if the next digit would be >= 5, otherwise round down.
Notes
- When changing trains at an intermediate station, the earliest possible departure time is one minute after the time of arrival.
- All times are on the same day; the journey does not cross midnight.
- It never happens that two or more trains depart from the same station at the same time to the same destination station.
- The input is such that there is a unique route with maximum probability.
- The passenger will stick to his route, always taking the first available train to the next station. If a train is cancelled he will wait for the next train to that station. He will never try to be smart by taking faster trains or different routes.