#include using namespace std; const long long MOD = 1e9 + 7; long long solve(int n, const vector &a) { vector f(n+1); f[0] = 1; for (int i = 1; i <= n; i++) f[i] = i * f[i-1] % MOD; long long x = 0; long long ret = 1; for (int i = 0; i < a.size(); i++) { if ((a[i] & x) != x) return 0; int l = __builtin_popcountll(a[i] & ~x); ret = ret * f[l] % MOD; x = a[i]; } return ret; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; vector a(k); for (int i = 0; i < k; i++) cin >> a[i]; sort(a.begin(), a.end()); a.push_back((1LL<