#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<string> using namespace std; int main() { char s1[200],s2[200]; cin>>s1>>s2; int len1=strlen(s1); int len2=strlen(s2); char *ret; if (len1==len2&&strcmp(s1,s2)==0) { cout<<s2<<" is substring of "<<s1; } else if (len1==len2&&strcmp(s1,s2)!=0){ cout<<"No substring"; } else if (len1>len2) { ret=strstr(s1,s2); if(ret){ cout<<s2<<" is substring of "<<s1; } else { cout<<"No substring"; } } else if (len1<len2) { ret=strstr(s2,s1); if(ret) cout<<s1<<" is substring of "<<s2; else cout<<"No substring"; } }