#Lutece3062. k substring
k substring
Migrated from Lutece 3062 k substring
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
给定 个字符串 。对于每个字符串 ,求它有多少非空子串是所有 个字符串中至少 个字符串的子串。
两个子串不同,当且仅当他们在原串中的位置不同或长度不同。
Input
第一行两个整数 和 。
接下来 行,每行一个字符串。
Output
输出一行 个整数,其中第 个整数表示第 个字符串的答案。
Samples
3 1
abc
a
ab
6 1 3
5 3
cb
c
aabcc
b
bcb
2 1 3 1 3
Constraints
Resources
2023 UESTC ICPC Training for String