AC

123Y456  •  1个月前


//nhuilbhjgcanbjbghn(不要复制这一行)

include

include

using namespace std;

int main() {

string pat, txt;
getline(cin, pat);
getline(cin, txt);	
int c = 0, p = 0;
while(1){
	p = txt.find(pat, p);
	if(p == string::npos){
		break;
	}
	++c;
	++p;
}
cout << c;

return 0;

}


评论:

请先登录,才能进行评论