I’ve been working on Measuring Traffic and I can’t understand the logic behind a specific solution about it. So the solution in question is as such: Solution - Measuring Traffic (USACO Bronze February 2019)

It updates minimum and maximum values of cars by each mile but my question is, if we have a series of off and on ramps then our high and low would represent the maximum and minimum number of cars that have gotten on the ramp from that point on. However, the comparison for the solution notes that we have high update itself by comparison.

What I don’t understand is, if we have an understanding of how many cars have gotten on or off from a certain point, how can that piece of information give any clue as to how many cars there were at a former section of the track.

For instance, if I know that between 30 and 35 cars have gotten on from mile i, and the sensor for mile i states that between 27 and 37 cars passed through it, i update my high and low to 30 and 35.

Hence, I’d be getting information about how many cars there were through something that can’t possibly tell me how many cars there were as the number of cars that got on has no relation to the number of cars that were there to begin with.

I’m confused about this specific part, could someone please let me know what fallacy I’m making here?

Thanks!