The summary of problem is this:
“”“Each mountain has some L liter of fuel but some mountains are occupied by the thieves and they take away some amount of fuel from us on gun point.
we have to land our helicopter once and can cover consecutive mountains through ziplines. At the starting we have some amount of fuel with him us it is possible that we can end up losing some amount of fuel.”“”"
so my doubt is , if there are 4 mountains with fuels -2, -3, -1, +7 the max amount of fuel we can collect is 1 liter right? but when i feed this input into some solutions i get the answer as +7 not +1. isn’t that wrong,or am i missing anything?
link for the problem CodeChef: Practical coding for everyone