Asking help from smart math people (Again)
Go to solution
Solved by Dash Lambda,
It uses i as an index, so xi is the distance to the ith gas station from the starting point and ci is how long it takes the ith gas station to fill up. So a gas station that's 20 miles from SF that takes 5 minutes to fill up would have xi = 20 and ci = 5.
As for hints: Since you're trying to find the path that will spend the least time filling up, the distance between the gas stations only matters for determining which ones can connect. You can use that fact to directly apply an algorithm you're familiar with.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now