Solve pancakes.
Reduce allocation and garbage collection cost in subvector.