Sponsored
Use these hints if you're stuck. Try solving on your own first.
How much is change actually necessary while calculating the required path?
How many extra edges do we need to add to the shortest path?
Solve with full IDE support and test cases