解题思路:
注意事项:
参考代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s,s1;
cin>>s>>s1;
if(s1.find(s)!=-1)
{
cout<<s<<" is substring of "<<s1;
return 0;
}
if(s.find(s1)!=-1)
{
cout<<s1<<" is substring of "<<s;
return 0;
}
else if(s.find(s1)==-1)
{
cout<<"No substring";
return 0;
}
return 0;
}
0.0分
0 人评分