XOR sum

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

You have an array of nn kk-bit numbers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n.

You need to calculate _i=1n_j=i+1n(a_ia_j)x\sum\_{i=1}^{n} \sum\_{j=i+1}^{n} (a\_i \oplus a\_j)^x.

Operation aba \oplus b is bitwise exclusive OR of two numbers aa and bb.

Since the answer can be very large, output it modulo 998,244,353998\\,244\\,353.

입력

The first line of the input contains three integers n,k,xn, k, x (1n,k,nk300,0001 \leq n, k, n \cdot k \leq 300\\,000, 1x31 \leq x \leq 3) --- length of an array, number of bits in each number and the power of exclusive OR operations results in the sum.

Next nn lines contain array elements.

The ii-th of them contains string s_0,s_1,,s_k1s\_0, s\_1, \ldots, s\_{k-1}, consisting of '0' and '1'.

Then a_i=a\_i = _i=0k1s_i2i\sum\_{i=0}^{k-1} s\_i \cdot 2^i.

출력

Print one number --- the remainder of division of the sum of xx-th powers of exclusive OR results of all pairs of numbers in the array by 998,244,353998\\,244\\,353.

힌트

In the first sample array contains integers \[5,4,4]\[5, 4, 4], and the answer is (54)+(54)+(44)=1+1+0=2(5 \oplus 4) + (5 \oplus 4) + (4 \oplus 4) = 1 + 1 + 0 = 2.

In the second sample array contains integers  \[61,38]\[61, 38], and the answer is (6138)3=273=19683(61 \oplus 38)^3 = 27^3 = 19683.