AT_arc198_e [ARC198E] Monotone OR
Description
You are given a set $ S = \lbrace s_1,s_2,\dots,s_M \rbrace $ of non-negative integers between $ 0 $ and $ 2^N - 1 $ (inclusive).
You start with a non-negative integer $ x = 0 $ . Find the number, modulo $ 998244353 $ , of ways to reach $ x = 2^N $ by performing the following operation any number of times:
- Choose an integer $ i $ with $ 1 \le i \le M $ , and replace $ x $ with $ (x\ \mathrm{OR}\ s_i) + 1 $ .
Here, $ \mathrm{OR} $ denotes the bitwise logical OR.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ M $ $ s_1\ s_2\ \dots\ s_M $
Output Format
Output the number of ways, modulo $ 998244353 $ .
Explanation/Hint
### Sample Explanation 1
Let $ (i, k) $ denote the transition when an operation chooses $ i $ and results in $ x = k $ . There are five ways that satisfy the conditions:
- $ (1,2) \rightarrow (1,4) $
- $ (1,2) \rightarrow (2,3) \rightarrow (1,4) $
- $ (1,2) \rightarrow (2,3) \rightarrow (2,4) $
- $ (2,3) \rightarrow (1,4) $
- $ (2,3) \rightarrow (2,4) $
Even if the sequence of values of $ x $ is identical, ways that differ in the choices of $ i $ are counted separately.
### Constraints
- $ 1 \le N \le 24 $
- $ 1 \le M \le \min(2^N,2 \times 10^{5}) $
- $ 0 \le s_1 < s_2 < \dots < s_M < 2^N $