local mmi, mma = math.min, math.max local bor = bit.bor local mod = 998244353 local mfl = math.floor local function bmul(x, y) local x0, y0 = x % 31596, y % 31596 local x1, y1 = mfl(x / 31596), mfl(y / 31596) return (x1 * y1 * 62863 + (x1 * y0 + x0 * y1) * 31596 + x0 * y0) % mod end local function badd(x, y) return (x + y) % mod end local function modpow(src, pow) local res = 1 while 0 < pow do if pow % 2 == 1 then res = bmul(res, src) pow = pow - 1 end src = bmul(src, src) pow = mfl(pow / 2) end return res end local function modinv(src) return modpow(src, mod - 2) end local n, k = io.read("*n", "*n") local a = {} for i = 1, n do a[i] = io.read("*n") end if 10 < k then print(0) os.exit() end local alltask = {{}} for i = 1, 1023 do alltask[1][i] = 0 end for i = 1, n do alltask[1][a[i]] = alltask[1][a[i]] + 1 end local at1 = alltask[1] for ik = 2, k do alltask[ik] = {} local atp = alltask[ik - 1] local atk = alltask[ik] for i = 1, 1023 do atk[i] = 0 end for i = 1, 1023 do for j = 1, 1023 do if i + j == bor(i, j) then local dst = i + j atk[dst] = badd(atk[dst], bmul(at1[i], atp[j])) end end end local inv = modinv(ik) for i = 1, 1023 do atk[i] = bmul(atk[i], inv) end end local ret = 0 for i = 1, 1023 do ret = badd(ret, alltask[k][i]) end print(ret)