6
2023-09-23 14:14:07
发布于:广东
13阅读
0回复
0点赞
#include <bits/stdc++.h>
#include <string>
using namespace std;
string s1,s2;
int t=0;
int main()
{
cin>>s1>>s2;
if(s1.find(s2)!=-1)
{
cout<<s2<<" is substring of "<<s1;
}
else if(s2.find(s1)!=-1)
{
cout<<s1<<" is substring of "<<s2;
}
else
{
cout<<"No substring";
}
return 0;
}
这里空空如也
有帮助,赞一个