fn solve_offset(skip: &[bool], j: usize) -> usize
o = j + 1 + [skip_j] of Algorithms V and W of Chapter 5.16.
o = j + 1 + [skip_j]