Expedi challenge problem

dont understand how to do please explain

@Learning_bunny
The problem is a modified version of this https://www.geeksforgeeks.org/number-of-refills-to-complete-the-journey-of-n-km/
Have a look at it

what is the role of m in that explanation on geeksforgeeks

@Learning_bunny
M is number of Gas Tanks
Just like N in our question

ok and in the sample input given, the distance between town and the fuel top is increasing in every step whereas it should decrease with every fuel stop

the second is the amount of fuel available at that stop , does this line says that fuel available at the stop i.e. te max fuel which we can get at that stop or it is the fuel we will have in our truck

and the code given in the pdf gives wrong output

@Learning_bunny
You might have copied the code from pdf incorrectly so please cross check that once and if you’re sure its wrong I’ll send your concern to the team
I request you to go through this code once https://ide.codingblocks.com/s/230416
Many of your doubts will be resolved after understanding this
Then we can discuss the remaining doubts that you may still have