def popcount(x): x = x - ((x >> 1) & 0x55555555) x = (x & 0x33333333) + ((x >> 2) & 0x33333333) x = (x + (x >> 4)) & 0x0f0f0f0f x += x >> 8 x += x >> 16 return x & 0x0000003f MOD = 998244353 def convolve_subset(A, B): n = max(len(A), len(B)) l = ((n - 1).bit_length()) m = 1 << l l += 1 A_ = [0] * (l * m) B_ = [0] * (l * m) for i, a in enumerate(A): A_[i * l + popcount(i)] += a A_[i * l + popcount(i)] %= MOD for i, b in enumerate(B): B_[i * l + popcount(i)] += b B_[i * l + popcount(i)] %= MOD def f(A): for i in range(l): for bit in range(m): if bit >> i & 1: for j in range(l): A[bit * l + j] += A[(bit ^ (1 << i)) * l + j] A[bit * l + j] %= MOD def invf(A): for i in range(l): for bit in range(m): if bit >> i & 1: for j in range(l): A[bit * l + j] -= A[(bit ^ (1 << i)) * l + j] A[bit * l + j] %= MOD f(A_) f(B_) C_ = [0] * (l * m) for bit in range(m): for i in range(l): for j in range(l): if i + j >= l: break C_[bit * l + i + j] += A_[bit * l + i] * B_[bit * l + j] C_[bit * l + i + j] %= MOD invf(C_) C = [0] * m for i in range(m): C[i] = C_[i * l + popcount(i)] return C MOD = 998244353 n, k = map(int, input().split()) if k > 10: print(0) exit() A = list(map(int, input().split())) X = [0] * (1 << 10) for a in A: X[a] += 1 ans = [0] * (1 << 10) ans[0] = 1 for _ in range(k): ans = convolve_subset(ans, X[:]) inv = 1 for i in range(2, k + 1): inv *= i inv %= MOD inv = pow(inv, MOD - 2, MOD) print(sum(ans) * inv % MOD)