9026: Bobo String Count

内存限制:128 MB 时间限制:4 S
题面:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

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.

输入格式

The first line contains two integers n,k (1≤n≤50000,0≤k≤n). 
The second line contains a binary string ttt (1≤∣t∣≤50000).

输出格式

Output an integer in one line, denoting the answer modulo 998244353.

输入样例 复制

5 2
11

输出样例 复制

6

数据范围与提示

第三组输入输出:
输入
10 0
1001
输出
631