Identify the Feasibility
题号:NC295135
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Recently, Colin has been learning the relationship between sets and bitmasks. We can use binary numbers (bitmasks) to represent sets, and if some bits are 1 in the bitmask, then it means that the sets include the elements corresponding to the indices of these bits.

Now Colin has n non-negative integers a_1,a_2,\cdots,a_n and all these integers are less than 2^k. Now Colin tries to use the concept of bitmasks and sets to understand the relationship between these integers.

For a non-negative integer x\in[0,2^k), Colin defines that a_i is fesible with a_j under the augmentation of x, if and only if the set corresponding to the bitmask a_i+x is a subset of the set corresponding to the bitmask a_j+x. Then Colin uses f(x) to represent the number of all the pairs (i,j) such that a_i is feasible with a_j under the augmentation of x.

Now Colin would like to ask you to calculate the sum of all the f(x), modulo 998244353
Formally, please calculate
\bigg(\sum_{x=0}^{2^k-1} f(x)\bigg) \mod 998244353

输入描述:

The first line contains two integers n,k~(1\le n\le 10^6, 1\le k\le 20), representing the number of integers Colin has and all of these integers are less than 2^k.

The following line contains n integers a_1,a_2,\cdots,a_n~(0\le a_i< 2^k).

输出描述:

Output a single integer, representing the answer.
示例1

输入

复制
2 2
2 0

输出

复制
10

说明

f(0)=3(1,1),(2,1),(2,2)
f(1)=3(1,1),(2,1),(2,2)
f(2)=2(1,1),(2,2)
f(3)=2(1,1),(2,2)