its a challenge ..should ans with help of coding(any language)
This is the year 3017. Humans have conquered the galaxies and invented new forms of travel. The concept of time has taken new meaning, and spaceships can travel between stars very quickly. A new discovery is that of wormholes, which exist between some stars, which can take you back in time. If you enter a wormhole at time T, you exit it at the other point at time FLOOR(T/2). Here the FLOOR(x) gets the largest integer which is not greater than x. Stars are numbered 1 to N, and star catalogues are available online. This contains time taken for travel from one star to another. Note that due to the position of black holes, the time given for travel from Star I to Star j is for that direction only, and travel in the reverse direction may take a different length of time, or not possible at all. If a path from Star I to Star j is not listed, it is not possible to travel between these two directly. Worm holes may also be travelled in one direction only, and are indicated with a travel time of -1 The objective is to determine the earliest time to arrive at a given destination from a given start point, assuming you are starting at time T=0.