Approach hintTry it first, then revealHide
Accumulate each player's eating time and always advance the player whose total is smaller; on equal totals Alice moves, matching the tie rule. Stop when the two indices cross.
Accumulate each player's eating time and always advance the player whose total is smaller; on equal totals Alice moves, matching the tie rule. Stop when the two indices cross.