Stuck on USACO Silver 2020 US Open - Social Distancing

In line 35 of the internal solution to USACO Silver 2020 US Open - Social Distancing, shouldn’t there be a less than or equal to sign instead of a less than sign?

This is the specific line of code I am referring to:
while ((current + mid) < intervals[m - 1].second) {

This is because shouldn’t a cow be allowed to stand on the very end/last piece of grass or is this not allowed? Thanks in advance.

1 Like

You’re right; the code fails on this input.

2 1
0 3