There are N students and intelligence of each student is given in the form of array A .
There are Q queries.In each query Integer X is given.For each query you have to print number of groups of students having strength greater than or equal to X. Strength of group is defined as bitwise OR of intelligence of all the students present in that group.
note:- Two groups are said to be different if they have atleast one student which is not present in both groups.
Input:
First line contains N and Q.
Second line contains N integers where ith integer denotes intelligence of ith student.
Next Q lines will contain X.
Output:
For each query you have to print number of groups of students having strength greater than or equal to X.
Constraints:
1≤N≤20
1≤Q≤105
1≤intelligence≤105
For X=7:
Subsets having Strength≥ 7 are:
{3,4},{2,3,4},{1,2,3,4},{1,3,4},{4,2,1}.