When pop stars make their international tours they usually prefer to spend as little time as possible for travel and to save more time for rehearsal, shows and for their private life. Therefore they travel only by airplanes and constantly search for the fastest route to destination. However, nowadays there are so many possibilities for traveling that finding the fastest way for a long distant trip is not an easy task. That is why a program capable to solve this problem would be prized on the market and you as an independent software developer are strongly encouraged to write such a program.
Since pop stars travel only by airplanes your task is greatly simplified. You need to take into account only international airports and flights connecting them.
- There are some facts about a journey by airplanes that you should know:
international airports are located in different time zones,
- each airport has flight schedule which defines destination, departure time and travel time for each flight; this schedule works on daily basis,
- boarding the airplane (as well as changing from one airplane to another) takes time, which differs from one airport to another.
To formalize the problem, we make the following steps:
- all international airport names are coded as identifiers represented by sequences of no more than 20 alphanumeric characters or underline characters (i.e. 'a'...'z', 'A'...'Z', '0'...'9' or '_'); all identifiers are unique,
- all flight identifiers are combination of company code and flight number with a total length of no more than 5 alphanumeric characters; all such identifiers are unique,
- all identifiers are case sensitive,
- all data which represent time have a format of "hh:mm", where "hh" and "mm" are digits from '0' to '9' representing hours and minutes respectively; if not specified otherwise the local time is used.
Using these assumptions, you should write a program to find the fastest route from the airport of origin to the destination one.