#include<bits/stdc++.h>
using namespace std;
string a,b,c;
int main(){
    cin>>a>>b;
    if(a.find(b)!=-1)
    {
    	cout<<b<<" is substring of "<<a;
    }
    else if(b.find(a)!=-1)
	{
    	cout<<a<<" is substring of "<<b;
    }else 
	{
		cout<<"No substring";
	}
    return 0;
}

2 comments

  • 1

Information

ID
6865
Time
1000ms
Memory
256MiB
Difficulty
8
Tags
# Submissions
1092
Accepted
182
Uploaded By