Jumping Through Segments
MediumRating 1400CodeforcesBinary Search on Answer
Approach hintTry it first, then revealHide
For a fixed k, track the interval of positions reachable after each move: widen it by k on both sides, then intersect it with the next segment. If it never becomes empty, k works, and so does every larger value.