Problem 3796 · Medium
Propagate each position cap forward and backward through the step limits, then take the largest cap.
Open the interactive visualisation