Finished

So silly - I just didn't read the instructions carefully. In fact, my
first approach was actually closer to what was required. There's still a
subtle bug regarding order-of-appearance of duplicate values not equal
to half of the budget in the sequence vector, but it passed validation.