Seunghyun is a mathematician, and he likes good jokes.
For a set U = {0, 1, ..., 2k - 1}, a nonempty subset
is good if it satisfies the following rules.
, their bitwise-and
should be in S.
, their bitwise-or
should be in S. You are given n distinct integers in [0, 2k - 1] range. Find the number of good sets which contains all n integers.
The first line contains two integers k, n. (1 ≤ k ≤ 7, 0 ≤ n ≤ 2k)
The next line contains n distinct integers a1, a2, ..., an(0 ≤ ai ≤ 2k - 1).
Print a single integer denoting the number of good sets.
2 1
0
7
4 3
1 2 7
29
| Name |
|---|


