Question
Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each
Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each line outputs a set of calculated shortest path distances, please do not output Additional information in answer.txt (eg: Show list:/ Answer: ...) No need to print anything on the terminal Please implement Dijkstra Shortest Path Algorithm for this question, this question is not limited to STL Container The program file is in the same directory as input.txt and answer.txt, and only a single program file needs to be submitted, named [student number].c or [Student ID].cpp, put the program file in the [No28] folder and upload it together with other files. Wrong naming (cases are considered different), including any other files such as [input.txt] , [answer.txt] , [*.exe], [*.h], points will be deducted for those who output any message in the terminal. [input.txt] The first line: data ratio (0 [answer.txt] Each line outputs a set of calculated shortest path distances (how many pieces of data there are, that is, how many lines are output) **Please output the shortest path distance as an integer (int)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started