There is a car with * c litters of gas at the beginning*, and

*. There are*

**the max capacity of gas the car can carry is n litters***, each represented as 2 integers:*

**m gas stations***of that gas station, and*

**p - the coordinate***of each litter of gas in that gas station.*

**x - the price**The car * starts at point 0*, and

*.*

**needs to go to point d**Assume that it takes **1 litter of gas per meter**

What is the **least amount of money** to pay to get to point d?

I'm thinking of dynamic programming but don't know where to start.

Read more here: https://stackoverflow.com/questions/68478273/dynamic-programming-gas-stations-with-minimum-cost-problem

### Content Attribution

This content was originally published by UTL at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.