#include #include #include using namespace std; int main(int argc, char* argv[]) { int ans=0; string S,C; cin>>S; char *pStr; int M; cin>>M; int i; for (i=0;i>C; pStr=(char*)S.c_str(); char *q=(char*)C.c_str(); while (true){ char *p=strstr(pStr,q); if (p){ ans++; pStr=p+1; }else{ break; } } } cout<