As a software developer you are tasked with developing a software to keep track of a large network of roads between cities. All the roads between the two cities require a certain toll fee and they are bi-directional.
Help the residents of your city find the best minimum price to pay to travel to another city to see their friends. On top of that, each traveller is only granted a certain amount of toll credit. You also need to make sure that the lowest toll fee shouldn't exceed the given budget.
Input Format
Output Format Print an integer representing the minimum toll fee to travel from the starting city to the destination city without exceeding the budget. If there is no path from the starting city to the destination city within the budget, return -1.
Constraints