406783: GYM102538 I Ignore Submasks

Memory Limit:0 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Ignore Submaskstime limit per test1 secondmemory limit per test512 mebibytesinputstandard inputoutputstandard output

You are given an array of $$$n$$$ integers, $$$a_1, a_2, \ldots, a_n$$$. Each integer is between $$$0$$$ and $$$2^k-1$$$, inclusive.

Let's say that $$$f(x)$$$ is the smallest $$$i$$$, such that $$$(a_i \& x) \neq a_i$$$, or $$$0$$$, if there are no such $$$i$$$. $$$(a \& b)$$$ is the bitwise AND operation.

Find $$$f(0) + f(1) + \ldots + f(2^k-1)$$$. As this value may be very large, find it modulo $$$998\,244\,353$$$.

Input

The first line contains two integers: $$$n,k$$$ ($$$1 \leq n \leq 100, 1 \leq k \leq 60$$$).

The next line contains $$$n$$$ integers: $$$a_1, a_2, \ldots, a_n$$$ ($$$0 \leq a_i < 2^k$$$).

Output

Print one integer: $$$f(0) + f(1) + \ldots + f(2^k-1)$$$, modulo $$$998\,244\,353$$$.

ExamplesInput
2 1
0 1
Output
2
Input
2 2
2 1
Output
4
Input
5 10
389 144 883 761 556
Output
1118
Note

In the first example, $$$f(0) = 2, f(1) = 0$$$.

In the second example, $$$f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 0$$$.

Source/Category

加入题单

上一题 下一题 算法标签: