You are given a sequence of positive integers .
In one operation, choose two adjacent entries with values and such that . Replace the pair with the single entry , preserving the order of all other entries.
Find the minimum length attainable after zero or more operations.
For each test case, output the minimum attainable length.
Every adjacent pair sums to , so no operation is possible.
Merge the first two entries to get , then merge the remaining pair to get .
The sequence already has length .
Either legal merge leaves , where no further merge is possible.
Merge the first two entries three times to get .