Test case of Minimum time traversal problem

Can anyone explain me 3rd test case of Minimum time traversal problem? From my calculations using 1st pipelining, we will get minimum time takes as 130.

bro read this -
Robot use pipeline => (20,20) --> (25, 25) -->(30,30) --> (100,100) , Total time = |20-25| +|20-25| + 5 + |30-100|+|30-100| = 155

1 Like

if you are not able to think for logic see my code…

Thank you brother for helping me out…I could not thought that the input details of pipelines can be reversed. Going through your code help me realise it.

I have a question though, can you explain to me why did you decrement vst[i] on line 83. My intuition is that it will make the function consider that particular pipeline, and if we had not decremented it further looping would have not considered that pipeline at all.

There is a lot of #define preprocessors used by you…I want to learn to implement them. Can you suggest how to build a pack of #define preprocessors for CP, and I did not understand line 52-59. If you could help me out with all these I’d be great.

Thank you so much for your help :wink:

bro 52 - 59 is for debuging … write bug() and pass as many parameters as u want. eg. bug(a) or bug(a,b)

1 Like

u explain to me why did you decrement vst[i] on line 83
because for considering all the possible paths … its basically in coding language called bactraking.

1 Like

I am not able to understand your code. Please can you help me?