RE求助
查看原帖
RE求助
1032485
a_w_s_l楼主2023/8/17 16:27
#include<bits/stdc++.h>
using namespace std;
string a,b,n,m,d;
int t,c;
int main(){
	cin.tie(0);
	cout.tie(0); 
	cin>>t;
	for(int i=1;i<=t;i++){
		c=0;
		cin>>n>>m>>a>>b;
		for(int j=0;j<b.size();i++){
			tolower(b[i]);
		}
		for(int j=0;j<a.size();i++){
			tolower(a[i]);
		}
		for(int j=0;j<b.size();j++){
			if(b.substr(j,a.size())==a)c++;
		}
		cout<<c<<endl;
	}
	return 0;
}
2023/8/17 16:27
加载中...