The Best Problem of 2021

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

문제

The year is 2021. People still care about COVID, NNSU just won ICPC 2020, and he is already crazy, we just don't know yet how much. We are looking for the problems for the SnackDown finals and 7dan suggested this one. For some reason, we decided not to use it then, but internally it became known as The Best Problem of 2021.

You are given an array BB of numbers and a number XX. Calculate (modulo 998,244,353998\\,244\\,353, obviously) the number of subsets SS of 1,2,,X\\{ 1, 2, \ldots, X \\} such that BB is one of its bases if we consider the numbers to be vectors over Z_2\mathbf{Z}\_2 with bitwise XOR as vector addition. BB is considered to be a basis of SS if it is an array of minimum size such that every element of SS can be written as bitwise XOR of elements of BB.

입력

The first line contains two integers nn and mm (1n,m20001 \le n, m \le 2000) --- the size of BB and the length of our numbers in binary. All elements of BB and the number XX will be given in their binary representation with a length of exactly mm (possibly with leading zeroes).

Each of the next nn lines contains a binary string of length mm which represents an element of BB.

The last line contains a binary string of length mm which represents the number XX.

출력

You'll figure it out.