#P1508. Anthem of Berland

Anthem of Berland

题目描述

给定 ss 串和 tt 串,其中 ss 串包含小写字母和问号,tt 串只包含小写字母。

假设共有 kk 个问号。你需要给把每个问号变成一个小写字母,共有 26k26^k 种可能。对于每种可能,设 tt 匹配 ss 的次数为 fif_i,请输出 max(fi)\max(f_i)

输入格式

输入共两行,两个字符串 s,ts,t1s,t1051\le |s|,|t| \le 10^5st107|s|\cdot |t| \le 10^7

输出格式

输出一个整数表示答案。

winlose???winl???w??
win
5
glo?yto?e??an?
or
3
??c?????
abcab
2