P16480 [GKS 2014 #A] 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 $2^{S_1}$, $2^{S_2}$, ..., $2^{S_N}$. He can only buy a lot of tiles sized $M \times M$, and he decides to only cut tiles parallel to their sides for convenience. How many tiles does he need to buy?

Input Format

The first line of the input gives the number of test cases: $\mathbf{T}$. $\mathbf{T}$ lines follow. Each line start with the number $\mathbf{N}$ and $\mathbf{M}$, indicating the number of required tiles and the size of the big tiles Enzo can buy. $\mathbf{N}$ numbers follow: $\mathbf{S_1}$, $\mathbf{S_2}$, ... $\mathbf{S_N}$, showing the sizes of the required tiles.

Output Format

For each test case, output one line containing "Case #x: y", where $x$ is the test case number (starting from 1) and $y$ is the number of the big tiles Enzo need to buy.

Explanation/Hint

### Limits $1 \leq 2^{\mathbf{S_k}} \leq \mathbf{M} \leq 2^{31}-1.$ **Small dataset (Test set 1 - Visible)** $1 \leq \mathbf{T} \leq 100.$ $1 \leq \mathbf{N} \leq 20.$ **Large dataset (Test set 2 - Hidden)** $1 \leq \mathbf{T} \leq 1000.$ $1 \leq \mathbf{N} \leq 500.$