Skip the starts that must fail
transcript
A cash van drives a ring of branches. You must find its first working start. Trying every start rescans the ring again and again. One rule skips most of that work.
Start at branch zero with an empty vault. Collect four, pay three, and hold one unit. At branch one, the cash is three but five is due. The trip fails after two branches.
Branch one would arrive with even less cash. So it fails at the same place, or earlier. Skip every start up to the failing branch. Try the first start after the failure.
Say the trip from s fails at step k. Then starts s plus one to s plus k fail. The next start to try is s plus k plus one.
Try branch two. It holds six and pays two. Every later branch is paid in full. The vault caps cash at six all the way. The first working start is branch two.
A failure rules out whole stretches of starts. Jump to s plus k plus one. Each branch is scanned about twice at most. Full breakdown in the lecture.