poj3461Oulipo】的更多相关文章

题目大意: 求字符串A在字符串B中出现的次数. 思路: KMP板题,用Hash也可水过~要学习KMP可参考http://blog.csdn.net/u011564456/article/details/20862555 代码: KMP: #include<cstdio> #include<cstring> #include<iostream> using namespace std; ],s2[]; ]; int main() { int n,i,l1,l2,j,ans…
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, mais tout s’affirmait faux. Tout avait Fair normal,…
[题意] 找出第一个字符串在第二个字符串中出现次数. [注意点] 一定要先将strlen存下来,而不能每次用每次求,否则会TLE! #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; +; +; char t[MAXN],p[MAXN]; int next[MAXM]; int lent,lenp; void getnex…