题意:
给母串str,和子串w,求在str中最多有几个w,w可以相互重叠
比如
str:ABABABA
w:ABA
ans=3
题解:
裸的KMP算法,只是这时候不是返回子串的位置,而是重复KMP遍历完整个串求个数
原题:
Oulipo
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 16626 | Accepted: 6656 |
Description
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:
Tout avait Pair normal,