import java.util.*; public class Main { static final int MOD = 998244353; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); if (k > 10) { System.out.println(0); return; } int[] arr = new int[n + 1]; for (int i = 1; i <= n; i++) { arr[i] = sc.nextInt(); } int[][] dp = new int[12][1 << 10]; dp[0][0] = 1; for (int i = 1; i <= n; i++) { for (int l = (1 << 10) - 1; l >= 0; l--) { if ((l ^ arr[i]) == l + arr[i]) { for (int j = 1; j <= 10; j++) { dp[j][arr[i] + l] += dp[j - 1][l]; dp[j][arr[i] + l] %= MOD; } } } } int ans = 0; for (int x : dp[k]) { ans += x; ans %= MOD; } System.out.println(ans); } }