Trace gas = [1,2,3,4,5], cost = [3,4,5,1,2].
Net at each station: [-2, -2, -2, 3, 3]. Total: -2-2-2+3+3 = 0. Possible!
i=0: tank = -2 < 0. Reset start = 1. tank = 0. i=1: tank = -2 < 0. Reset start = 2. tank = 0. i=2: tank = -2 < 0. Reset start = 3. tank = 0. i=3: tank = 3 >= 0. Continue. i=4: tank = 3 + 3 = 6 >= 0. Continue.
Answer: start = .
time, space.