Question: Plz provide the solution ASAP . It is ver urgent Description Problem Statement You are given a graph of Cities. The cities are numbered from
Plz provide the solution ASAP It is ver urgent
Description
Problem Statement
You are given a graph of Cities. The cities are numbered from to N You are in the City You have M routes, which come along with a cost. You have a special talent where you get the cost of the routes you move in Find the maximum cost you can acquire by moving from City to City
Note: You can assume that it's always possible to reach from City to City N However, if you can get an arbitrarily large score, return
Input Format
The first line contains an integer the total number of Cities.
The second line contains an integer M the total number of routes.
The third line contains an integer representing that there will be integers in the next lines.
The next M lines contains integers ABC representing a route from to with a cost of
Output Format
The maximum cost you can acquire by moving from City to City
Constraints
Evaluation Parameters
Sample Input
Sample Output
Explanation
If we see the graph, The maximum Cost we can acquire is We can move from to and to that will give the maximum cost.
Execution time limit
Default
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
