Logo
(追記) (追記ここまで)

18920번 - Banned Words 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB65403461.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円$.

제한

예제 입력 1

3 1
a
c
m

예제 출력 1

23

예제 입력 2

4 2
i
cp
pc
cc

예제 출력 2

622

예제 입력 3

4 12
china
russia
bytedance
mw

예제 출력 3

558811200

힌트

출처

Camp > Bytedance-Moscow Workshops Camp > Bytedance-Moscow Workshops Camp 2020 > Contest 1 B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /