There is an array of numbers of size n.

A bit string of a number is binary representation of that number. given an integer k we can get n

k-bit strings .

ex: n=2, k=5 array={10,26}, then bit strings are 01010, 11010.

(we should add padding of 0’s on left if necessary and It is guaranteed that max number in array < 2^k).

super bit string of a bit string is formed by alternating 0 or more no: of 0’s in the bit string

ex: super bit strings of 11010 are {11010, 11110, 11011, 11111}

Our objective is to find size of union of super bit strings of the n k-bit strings.

input: k<=18, n<=50000, a[i]<=262144

ex: n=2, k=5 array={10,26}, then size of union of super bit strings is 8.

10 - 01010, 26 - 11010.