Question: write code in C language. There are N cities and M bidirectional roads. The i-th road connects city A, and city B,, and the cost

There are N cities and M bidirectional roads. The i-th road connects

city A, and city B,, and the cost of passing it is

C. You have a VIP card, that can let you go through

any road for free. The VIP card can be used only once.

write  code  in C language.
 

There are N cities and M bidirectional roads. The i-th road connects city A, and city B,, and the cost of passing it is C. You have a VIP card, that can let you go through any road for free. The VIP card can be used only once. Your objective is to travel from city 1 to city N. Find the minimum possible total cost.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!