Input file: Standard Input
Output file: Standard Ouptut
Time limit: 6 seconds
Mr. Panda likes ice cream very much especially the ice cream tower. An ice cream tower consists
of K ice cream balls stacking up as a tower. In order to make the tower stable, the lower ice cream
ball should be at least twice as large as the ball right above it. In other words, if the sizes of the
ice cream balls from top to bottom are A0, A1, A2, · · · , AK−1, then A0 × 2 ≤ A1, A1 × 2 ≤ A2,
etc.
One day Mr. Panda was walking along the street and found a shop selling ice cream balls. There
are N ice cream balls on sell and the sizes are B0, B1, B2, · · · , BN−1. Mr. Panda was wondering
the maximal number of ice cream towers could be made by these balls.
Input
The first line of the input gives the number of test cases, T. T test cases follow. Each test
case starts with a line consisting of 2 integers, N the number of