| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 512 MB | 65 | 40 | 34 | 61.818% |
You are given a list of words consisting of lowercase English letters. Calculate the number of words of length $L$ that do not contain any of the words from the list as a substring.
Since the answer may be too big, print it modulo 998ドル,244円,353円$.
The first line contains two integers $b$ and $L$ (1ドル \le b \le 100$; 1ドル \le L \le 10^9+7$) --- the number of words in the list and word length you are interested in.
Each of the following $b$ lines contains a non-empty word consisting of lowercase English letters. The words are distinct. The total length of the words is not greater than 100ドル$.
Print the number of words of length $L$ that do not contain any word from the list as a substring, modulo 998ドル,244円,353円$.
3 1 a c m
23
4 2 i cp pc cc
622
4 12 china russia bytedance mw
558811200