#include #include using namespace std; using ll=long long; using ull= unsigned long long; namespace Lib{ struct Rolling_hash{ static constexpr ll rMOD=(1ll<<61)-1; ull base,inv; vector hash_val,pw; Rolling_hash(string St,unsigned b){ vector S(St.begin(),St.end()); base=b; ull c=1,t=base; ull h=0; pw.push_back(1); hash_val.push_back(0); for(int i=0;i<(int)S.size();i++){ h=(mul(h,base)+S[i])%rMOD; hash_val.push_back(h); pw.push_back(mul(pw.back(),base)); } } Rolling_hash(vector S,unsigned b){ base=b; ull c=1,t=base; ull h=0; pw.push_back(1); hash_val.push_back(0); for(int i=0;i<(int)S.size();i++){ h=(mul(h,base)+S[i])%rMOD; hash_val.push_back(h); pw.push_back(mul(pw.back(),base)); } } constexpr ull mul(ull a,ull b){ ull a1=a/(1ull<<31),a2=a%(1ull<<31),b1=b/(1ull<<31),b2=b%(1ull<<31); ull ret=0; ret=(ret+a1*b1*2)%rMOD; ull mid=a1*b2+b1*a2; ret=(ret+mid/(1ull<<30)+(mid%(1ull<<30))*(1ull<<31))%rMOD; ret=(ret+a2*b2)%rMOD; return ret; } ull get(int l,int r){ assert(l>N>>M>>K; string S,T; cin>>S>>T; constexpr int base=1400032941; string lowS=S,lowT=T; for(auto &i:lowS){ if(i<='Z')i^=32; } for(auto &i:lowT){ if(i<='Z')i^=32; } Lib::Rolling_hash hS(lowS,base),hT(lowT,base); vector Si(N,0),Ti(M,0); for(int i=0;i='a')Si[i]=1; } for(int i=0;i=1)ans+=1; } } cout<