#Lutece3281. Someone In The Crowd
Someone In The Crowd
Migrated from Lutece 3281 Someone In The Crowd
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
Tags: FFT
Emma:Someone in the crowd will take you.
Ryan:*w****o****s*******r*****t*****b****f*****.
Emma:?????
Ryan:****b*********d*****************.
有太多的内容变成乱码, Emma 根本不知道 Ryan 发给了她什么内容。
Emma 冥思苦想,终于知道了某个单词的意思。
现在她把这个单词发给了你,希望你能找出这个单词可能出现在 Ryan 消息的哪些位置。
注意:Emma 发给你的单词中也包含乱码
Input
第一行为两个整数 表示字符串 的长度
第二行为一个字符串 ,表示 Emma 发给你的单词。
第三行为一个字符串 ,表示 Ryan 发送的消息。
字符串仅包含小写字母和 *
,*
表示某个字符形成的乱码
Output
第一行一个整数 ,表示可能的出现位置的数量。
第二行 个整数,从小到大依次输出每个可以匹配的开头位置
Samples
2 4
a*
aaab
3
1 2 3
Constraints
Resources
2024 UESTC ICPC Training for String