![]() |
CISC4080, Computer Algorithms, Dynamic Programming Problems |
RoadTrip
./a.out This is a RoadTrip planning application! Enter the input... Entering the number of cities:6 Enter the distance of the n cities (from small to large):10 20 200 450 600 800 Optimal road trip as follows (index start from 0): 2(200),3(450),4(600),5(800),Penalty=5000 More test case (Y/N)?Y Enter the input... Entering the number of cities:3 Enter the distance of the n cities (from small to large):20 30 200 Optimal road trip as follows (index start from 0): 2(200),Penalty=0 More test case (Y/N)?Y Enter the input... Entering the number of cities:2 Enter the distance of the n cities (from small to large):195 260 Optimal road trip as follows (index start from 0): 1(260),Penalty=3600 More test case (Y/N)?N Cut Cloth
PrintingNeatly
|