After the failure of “Bobo Encoding” (for information on “Bobo Encoding”, you may refer to the statement of “Binary String Construction”, but it is not necessary to understand this problem), Bobo decided to study strings carefully. Now he is considering a very simple problem:
Given a string
t consisting of only
0s and
1s, a positive integer
nnn, and an integer
0≤k≤n, you need to calculate the number of strings
sss consisting of only
0s and
1s with length exactly
nnn, satisfying:
-
The string ttt appears exactly kkk times in the string sss (note that the appearance here can be overlapped, such as 101 appearing twice in 10101).
Since the answer may be too large, you need to output the answer modulo
998244353.