Max Routes With Budget

Starting from city 0 with a given budget, visit as many distinct cities as possible by traveling roads with costs. Use Dijkstra to compute shortest paths, then explore cities within the budget.

Examples
Input: [3,[[0,1,10],[1,2,20]],30]
Output: 3
Hints

Max Routes With Budget

Starting from city 0 with a given budget, visit as many distinct cities as possible by traveling roads with costs. Use Dijkstra to compute shortest paths, then explore cities within the budget.