403426: GYM101156 N Cut Tiles
Description
Enzo is doing renovation for his new house. The most difficult part is to buy exactly the right number of tiles. He wants n tiles of different sizes. Of course they have to be cut from the tiles he bought. All the required tiles are square. The lengths of side of the tiles are 2s1, 2s2, ..., 2sn. He can only buy a lot of tiles sized m × m, and he decides to only cut tiles parallel to their sides for convenience. How many tiles does he need to buy?
InputThe first line of the input gives the number of test cases: t (1 ≤ t ≤ 1000). t lines follow. Each line start with the number n (1 ≤ n ≤ 500) and m (1 ≤ m ≤ 231 - 1), indicating the number of required tiles and the size of the big tiles Enzo can buy. n numbers follow: s1, s2, ..., sn (1 ≤ 2sk ≤ m), showing the sizes of the required tiles.
OutputFor each test case, output one line containing the number of the big tiles Enzo need to buy.
ExampleInput4Output
1 6 2
2 6 2 2
3 6 2 1 1
7 277 3 8 2 6 1 3 6
1
2
1
2