#include<bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
cin>>s1>>s2;
int pos=0,total=0;
while((int)s1.find(s2,pos)!=-1){
pos=(int)s1.find(s2,pos)+1;
total++;
}
cout<<total;
return 0;
}正难则反
时间倒流
随机化
线段树:
- pushdown赋值后lazy_add=0
树状数组:
- 预处理lowbit